aboutsummaryrefslogtreecommitdiff
path: root/libobjc/objc/objc-api.h
diff options
context:
space:
mode:
authorNicola Pero <nicola.pero@meta-innovation.com>2010-10-10 23:28:12 +0000
committerNicola Pero <nicola@gcc.gnu.org>2010-10-10 23:28:12 +0000
commitbc18535a3e3a9a7f98ca4f86ca67e937bde6a883 (patch)
tree17394fa0ccdc53e9f5134ffd956a7fcc4ca13406 /libobjc/objc/objc-api.h
parentd3735479a3544423fb067c7c6c848159953ba266 (diff)
downloadgcc-bc18535a3e3a9a7f98ca4f86ca67e937bde6a883.zip
gcc-bc18535a3e3a9a7f98ca4f86ca67e937bde6a883.tar.gz
gcc-bc18535a3e3a9a7f98ca4f86ca67e937bde6a883.tar.bz2
objc.h: Updated comments.
2010-10-11 Nicola Pero <nicola.pero@meta-innovation.com> * objc/objc.h: Updated comments. * objc/objc-api.h: (object_copy): Added one argument; use a #define to maintain backwards-compatibility. Moved _objc_object_alloc, _objc_object_copy, _objc_object_dispose and objc_get_uninstalled_dtable into objc/deprecated/objc_get_uninstalled_dtable.h and objc/deprecated/objc_object_alloc.h. Include these files. * objc/deprecated/objc_get_uninstalled_dtable.h: New. * objc/deprecated/objc_object_alloc.h: New. * objc/runtime.h (set_getName): New. (sel_getType): New. (sel_getUid): New. (sel_registerName): New. (sel_registerTypedName): New. (sel_isEqual): New. (class_createInstance): New. (object_copy): New. (object_dispose): New. * objects.c: Do not include tconfig.h. Include gc_typed.h if building the garbage collection version. (__objc_object_alloc): Removed. (__objc_object_copy): Removed. (__objc_object_dispose): Removed. (class_createInstance): New from code in class_create_instance. Cast second argument of GC_malloc_explicitly_typed. Use objc_calloc. Do not call _objc_object_alloc. (class_create_instance): Call class_createInstance. (object_copy): Added extraBytes argument. Do not call _objc_object_copy. (object_dispose): Do not call _objc_object_dispose. * memory.c (objc_free): When using garbage collection, mark the argument as unused. * selector.c (sel_getName): New. (sel_get_name): Call sel_getName. (sel_getType): New. (sel_get_type): Call sel_getType. (sel_registerName): New. (sel_register_name): Call sel_registerName. (sel_registerTypedName): New. (sel_register_typed_name): Call sel_registerTypedName. (sel_getUid): New. (sel_get_uid): Call sel_getUid. From-SVN: r165264
Diffstat (limited to 'libobjc/objc/objc-api.h')
-rw-r--r--libobjc/objc/objc-api.h17
1 files changed, 8 insertions, 9 deletions
diff --git a/libobjc/objc/objc-api.h b/libobjc/objc/objc-api.h
index eced869..0763733 100644
--- a/libobjc/objc/objc-api.h
+++ b/libobjc/objc/objc-api.h
@@ -193,12 +193,7 @@ objc_EXPORT Class (*_objc_lookup_class)(const char *name);
*/
objc_EXPORT void (*_objc_load_callback)(Class _class, Category* category);
-/*
-** Hook functions for allocating, copying and disposing of instances
-*/
-objc_EXPORT id (*_objc_object_alloc)(Class _class);
-objc_EXPORT id (*_objc_object_copy)(id object);
-objc_EXPORT id (*_objc_object_dispose)(id object);
+#include "deprecated/objc_object_alloc.h"
/*
Standard functions for memory allocation and disposal. Users should
@@ -326,7 +321,12 @@ objc_EXPORT IMP method_get_imp(Method_t method);
objc_EXPORT IMP get_imp (Class _class, SEL sel);
-objc_EXPORT id object_copy(id object);
+/* object_copy used to take a single argument in the traditional GNU
+ Objective-C Runtime API (the one declared here), but takes 2 in the
+ modern API (implemented in the actual runtime). Define the old
+ object_copy in terms of the new one. */
+objc_EXPORT id object_copy (id object, size_t size);
+#define object_copy(X) (object_copy ((X), 0))
objc_EXPORT id object_dispose(id object);
@@ -394,8 +394,7 @@ object_is_meta_class (id object)
&& !object_is_class (object));
}
-objc_EXPORT struct sarray*
-objc_get_uninstalled_dtable(void);
+#include "deprecated/objc_get_uninstalled_dtable.h"
#ifdef __cplusplus
}