summaryrefslogtreecommitdiffstats
path: root/contrib/libobjc/objc/objc-api.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/libobjc/objc/objc-api.h')
-rw-r--r--contrib/libobjc/objc/objc-api.h28
1 files changed, 19 insertions, 9 deletions
diff --git a/contrib/libobjc/objc/objc-api.h b/contrib/libobjc/objc/objc-api.h
index fe34daf..9268020 100644
--- a/contrib/libobjc/objc/objc-api.h
+++ b/contrib/libobjc/objc/objc-api.h
@@ -1,5 +1,5 @@
/* GNU Objective-C Runtime API.
- Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1995, 1996, 1997, 2002 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -75,6 +75,7 @@ struct objc_method_description
#define _C_UNION_E ')'
#define _C_STRUCT_B '{'
#define _C_STRUCT_E '}'
+#define _C_VECTOR '!'
/*
@@ -260,7 +261,7 @@ typedef struct objc_method_list {
struct objc_protocol_list {
struct objc_protocol_list *next;
- int count;
+ size_t count;
Protocol *list[1];
};
@@ -414,6 +415,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);
@@ -571,21 +579,23 @@ object_get_super_class
}
static inline BOOL
-object_is_class(id object)
+object_is_class (id object)
{
- return CLS_ISCLASS((Class)object);
+ return ((object != nil) && CLS_ISMETA (object->class_pointer));
}
-
+
static inline BOOL
-object_is_instance(id object)
+object_is_instance (id object)
{
- return (object!=nil)&&CLS_ISCLASS(object->class_pointer);
+ return ((object != nil) && CLS_ISCLASS (object->class_pointer));
}
static inline BOOL
-object_is_meta_class(id object)
+object_is_meta_class (id object)
{
- return CLS_ISMETA((Class)object);
+ return ((object != nil)
+ && !object_is_instance (object)
+ && !object_is_class (object));
}
struct sarray*
OpenPOWER on IntegriCloud