Added __objc_msg_forward...
authorOvidiu Predescu <ovidiu@gcc.gnu.org>
Wed, 3 Jan 2001 08:49:34 +0000 (08:49 +0000)
committerOvidiu Predescu <ovidiu@gcc.gnu.org>
Wed, 3 Jan 2001 08:49:34 +0000 (08:49 +0000)
Added __objc_msg_forward, a hook that allows external libraries to
provide a function that returns the real forwarding function. This can
alleviate problems __builtin_apply() and friends have on various
platforms. (Solution suggested by Helge Hess.)

From-SVN: r38651

libobjc/objc/objc-api.h

index fe34daf..d3e22f2 100644 (file)
@@ -414,6 +414,13 @@ extern void *(*_objc_realloc)(void *, size_t);
 extern void *(*_objc_calloc)(size_t, size_t);
 extern void (*_objc_free)(void *);
 
+/*
+**  Hook for method forwarding. This makes it easy to substitute a
+**  library, such as ffcall, that implements closures, thereby avoiding
+**  gcc's __builtin_apply problems.
+*/
+extern IMP (*__objc_msg_forward)(SEL);
+
 Method_t class_get_class_method(MetaClass class, SEL aSel);
 
 Method_t class_get_instance_method(Class class, SEL aSel);