Add new shorthand
This commit is contained in:
1 parent
9dc83bc1b3
commit
2958c1d6aa
2 files changed
+29
-21
No files matched your search
@@ -31,6 +31,9 @@ copy :: proc(self: ^Copying($T)) -> ^T where intrinsics.type_is_subtype_of(T, Ob
|
||||
return msgSend(^T, self, "copy")
|
||||
}
|
||||
|
||||
new :: proc($T: typeid) -> ^T where intrinsics.type_is_subtype_of(T, Object) {
|
||||
return init(alloc(T))
|
||||
}
|
||||
|
||||
@(objc_type=Object, objc_name="retain")
|
||||
retain :: proc(self: ^Object) {
|
||||
|
||||
Reference in new issue
Block a user