diff options
| author | gingerBill <bill@gingerbill.org> | 2022-02-16 00:17:07 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2022-02-16 00:17:07 +0000 |
| commit | 0e69993d39e367a67911f361fde0ad2b58f6d4ea (patch) | |
| tree | f297f751683225c2f3afc976f370cfa3a2496dee | |
| parent | 135091ddbee9f5df9c546c5331d85c90001b06df (diff) | |
Add `init` and `copy` to all `Object`s
| -rw-r--r-- | vendor/darwin/Foundation/NSObject.odin | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/vendor/darwin/Foundation/NSObject.odin b/vendor/darwin/Foundation/NSObject.odin index 66cd5d617..33ef26a23 100644 --- a/vendor/darwin/Foundation/NSObject.odin +++ b/vendor/darwin/Foundation/NSObject.odin @@ -25,9 +25,11 @@ Copying :: struct($T: typeid) {using _: Object} alloc :: proc($T: typeid) -> ^T where intrinsics.type_is_subtype_of(T, Object) { return msgSend(^T, T, "alloc") } +@(objc_type=Object, objc_name="init") init :: proc(self: ^$T) -> ^T where intrinsics.type_is_subtype_of(T, Object) { return msgSend(^T, self, "init") } +@(objc_type=Object, objc_name="copy") copy :: proc(self: ^Copying($T)) -> ^T where intrinsics.type_is_subtype_of(T, Object) { return msgSend(^T, self, "copy") } |