summaryrefslogtreecommitdiff
path: root/objc_darwin.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-03-01 04:28:47 -0500
committerPietro Gagliardi <[email protected]>2014-03-01 04:28:47 -0500
commitd611722ac7f99ab6e63e713aca7fd0f4b83407e2 (patch)
tree943b81f0bdece6ac152425fec5c64012edd39ed5 /objc_darwin.go
parent5abea5cc61cc44bdcc7e6bd4b491844d7c5dd5d6 (diff)
Added _setDelegate to the common Objective-C selectors list and added a clarity wrapper function objc_setDelegate().
Diffstat (limited to 'objc_darwin.go')
-rw-r--r--objc_darwin.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/objc_darwin.go b/objc_darwin.go
index 524d9f7..028480c 100644
--- a/objc_darwin.go
+++ b/objc_darwin.go
@@ -34,6 +34,7 @@ var (
_release = sel_getUid("release")
_stringWithUTF8String = sel_getUid("stringWithUTF8String:")
_UTF8String = sel_getUid("UTF8String")
+ _setDelegate = sel_getUid("setDelegate:")
)
// some helper functions
@@ -64,6 +65,10 @@ func fromNSString(str C.id) string {
return C.GoString((*C.char)(unsafe.Pointer(cstr)))
}
+func objc_setDelegate(obj C.id, delegate C.id) {
+ C.objc_msgSend_id(obj, _setDelegate, delegate)
+}
+
/*
These are wrapper functions for the functions in bleh_darwin.m to wrap around stdint.h type casting.
*/