summaryrefslogtreecommitdiff
path: root/objc_darwin.h
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-03-05 10:31:16 -0500
committerPietro Gagliardi <[email protected]>2014-03-05 10:31:16 -0500
commit7866d3e0df9ff10643ee934a94e4d1268e0e5318 (patch)
tree243091b9e1acb3197de55504d219ae8fc0f94e6b /objc_darwin.h
parent40a9dc55c90e8c9261d9471ceae0c8ed3a8067a0 (diff)
Xcode 4 comes with a version of clang that treats inline differently: it requires exactly one definition of the inline function in the linked unit. static inline is C99-compliant (according to LeoNerd in freenode/##c) and does not have this problem, so use that in objc_darwin.h instead.
Fixes issue 1.
Diffstat (limited to 'objc_darwin.h')
-rw-r--r--objc_darwin.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/objc_darwin.h b/objc_darwin.h
index 1208e0e..e2d9d92 100644
--- a/objc_darwin.h
+++ b/objc_darwin.h
@@ -26,7 +26,7 @@ extern Class NilClass;
/* for listbox_darwin.go */
extern id *_NSObservedObjectKey;
-inline id objc_msgSend_noargs(id obj, SEL sel)
+static inline id objc_msgSend_noargs(id obj, SEL sel)
{
return objc_msgSend(obj, sel);
}
@@ -52,25 +52,25 @@ extern uintptr_t objc_msgSend_uintret_noargs(id objc, SEL sel);
extern intptr_t objc_msgSend_intret_noargs(id obj, SEL sel);
#define m1(name, type1) \
- inline id objc_msgSend_ ## name (id obj, SEL sel, type1 a) \
+ static inline id objc_msgSend_ ## name (id obj, SEL sel, type1 a) \
{ \
return objc_msgSend(obj, sel, a); \
}
#define m2(name, type1, type2) \
- inline id objc_msgSend_ ## name (id obj, SEL sel, type1 a, type2 b) \
+ static inline id objc_msgSend_ ## name (id obj, SEL sel, type1 a, type2 b) \
{ \
return objc_msgSend(obj, sel, a, b); \
}
#define m3(name, type1, type2, type3) \
- inline id objc_msgSend_ ## name (id obj, SEL sel, type1 a, type2 b, type3 c) \
+ static inline id objc_msgSend_ ## name (id obj, SEL sel, type1 a, type2 b, type3 c) \
{ \
return objc_msgSend(obj, sel, a, b, c); \
}
#define m4(name, type1, type2, type3, type4) \
- inline id objc_msgSend_ ## name (id obj, SEL sel, type1 a, type2 b, type3 c, type4 d) \
+ static inline id objc_msgSend_ ## name (id obj, SEL sel, type1 a, type2 b, type3 c, type4 d) \
{ \
return objc_msgSend(obj, sel, a, b, c, d); \
}