summaryrefslogtreecommitdiff
path: root/darwintest/runtimetest.c
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-02-27 20:48:32 -0500
committerPietro Gagliardi <[email protected]>2014-02-27 20:48:32 -0500
commitf949b7f8d2c53036d55d5e101c86ad35fbc706a5 (patch)
tree43ffbfbf943e4e07c223863711dafbb148fa96af /darwintest/runtimetest.c
parentfa7ef40c42c30807395ab3fe5019e04928102a20 (diff)
Ported the runtime test to Go. It works in both 32-bit and 64-bit!
Diffstat (limited to 'darwintest/runtimetest.c')
-rw-r--r--darwintest/runtimetest.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/darwintest/runtimetest.c b/darwintest/runtimetest.c
deleted file mode 100644
index c0109d3..0000000
--- a/darwintest/runtimetest.c
+++ /dev/null
@@ -1,22 +0,0 @@
-// 27 february 2014
-#include <stdio.h>
-#include <objc/message.h>
-#include <objc/objc.h>
-#include <objc/runtime.h>
-
-int main(void)
-{
- id NSString = objc_getClass("NSString");
- SEL stringFromUTF8String =
- sel_getUid("stringWithUTF8String:");
- id str = objc_msgSend(NSString,
- stringFromUTF8String,
- "hello, world\n");
- SEL UTF8String =
- sel_getUid("UTF8String");
-
- printf("%s",
- (char *) objc_msgSend(str,
- UTF8String));
- return 0;
-}