aboutsummaryrefslogtreecommitdiff
path: root/libobjc/objc
diff options
context:
space:
mode:
authorNicola Pero <nicola.pero@meta-innovation.com>2010-10-12 16:17:18 +0000
committerNicola Pero <nicola@gcc.gnu.org>2010-10-12 16:17:18 +0000
commit718a8e53dce6751ad2c25954adfa8f666bd9d36e (patch)
tree7e29a3f7298da78a7ec2df063e05a796f6ceb968 /libobjc/objc
parent729530c035d094bc047f0a0802db5bf3bfdca197 (diff)
downloadgcc-718a8e53dce6751ad2c25954adfa8f666bd9d36e.zip
gcc-718a8e53dce6751ad2c25954adfa8f666bd9d36e.tar.gz
gcc-718a8e53dce6751ad2c25954adfa8f666bd9d36e.tar.bz2
archive.c: Do not include objc/objc.h.
2010-10-12 Nicola Pero <nicola.pero@meta-innovation.com> * archive.c: Do not include objc/objc.h. * class.c: Do not include objc/objc.h. * encoding.c: Include objc/runtime.h, ctype.h and objc-private/module-abi-8.h instead of objc/objc-api.h and objc/encoding.h. * error.c: Do not include objc/objc.h. * gc.c: Include tconfig.h and objc/encoding.h only if OBJC_WITH_GC. * hash.c: Include objc/runtime.h and objc/thr.h instead of objc/objc-api.h. Do not include objc/objc.h. * init.c: Do not include objc/objc.h. * ivars.c: Include objc/runtime.h, objc-private/module-abi-8.h and objc/thr.h instead of objc/objc-api.h. Do not include objc/objc.h. * linking.m: Tidied comment. * memory.c: Include objc/runtime.h instead of objc/objc-api.h. Do not include objc/objc.h. * objects.c: Do not include objc/objc.h. * objc-sync.c: Include objc/runtime.h instead of objc/objc-api.h. * protocols.c: Do not include objc/objc.h. * sarray.c: Include objc/runtime.h instead of objc/objc-api.h. Do not include objc/objc.h. * selector.c: Do not include objc/objc.h. * sendmsg.c: Do not include objc/objc.h. * thr.c: Include objc/runtime.h instead of objc/objc-api.h. Do not include objc/objc.h. * objc/objc-decls.h: Reindented code. * objc/runtime.h Include objc-decls.h. Updated comments. (objc_malloc): New. (objc_atomic_malloc): New. (objc_calloc): New. (objc_realloc): New. (objc_free): New. * objc-private/runtime.h: Updated comments. From-SVN: r165386
Diffstat (limited to 'libobjc/objc')
-rw-r--r--libobjc/objc/objc-decls.h14
-rw-r--r--libobjc/objc/runtime.h30
2 files changed, 36 insertions, 8 deletions
diff --git a/libobjc/objc/objc-decls.h b/libobjc/objc/objc-decls.h
index e5388e3..b3cfb21 100644
--- a/libobjc/objc/objc-decls.h
+++ b/libobjc/objc/objc-decls.h
@@ -28,13 +28,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#if defined (_WIN32) || defined (__WIN32__) || defined (WIN32)
-# ifdef DLL_EXPORT /* defined by libtool (if required) */
-# define objc_EXPORT
-# define objc_DECLARE
-#else
-# define objc_EXPORT extern __declspec(dllimport)
-# define objc_DECLARE extern __declspec(dllimport)
-#endif
+# ifdef DLL_EXPORT /* defined by libtool (if required) */
+# define objc_EXPORT
+# define objc_DECLARE
+# else
+# define objc_EXPORT extern __declspec(dllimport)
+# define objc_DECLARE extern __declspec(dllimport)
+# endif
#else
diff --git a/libobjc/objc/runtime.h b/libobjc/objc/runtime.h
index b5ae87b..6efe78d 100644
--- a/libobjc/objc/runtime.h
+++ b/libobjc/objc/runtime.h
@@ -48,6 +48,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
/* TODO: This file is incomplete. */
#include "objc.h"
+#include "objc-decls.h"
/* An 'Ivar' represents an instance variable. It holds information
about the name, type and offset of the instance variable. */
@@ -543,11 +544,38 @@ struct __objcFastEnumerationState
*/
+/** Implementation: the following functions are in memory.c. */
+
+/* Traditional GNU Objective-C Runtime functions that are used for
+ memory allocation and disposal. These functions are used in the
+ same way as you use malloc, realloc, calloc and free and make sure
+ that memory allocation works properly with the garbage
+ collector.
+
+ Compatibility Note: these functions are not available with the
+ Apple/NeXT runtime. */
+
+objc_EXPORT void *objc_malloc(size_t size);
+
+/* FIXME: Shouldn't the following be called objc_malloc_atomic ? The
+ GC function is GC_malloc_atomic() which makes sense.
+ */
+objc_EXPORT void *objc_atomic_malloc(size_t size);
+
+objc_EXPORT void *objc_realloc(void *mem, size_t size);
+
+objc_EXPORT void *objc_calloc(size_t nelem, size_t size);
+
+objc_EXPORT void objc_free(void *mem);
+
+
/** Implementation: the following functions are in encoding.c. */
/* Traditional GNU Objective-C Runtime functions that are currently
used to implement method forwarding.
-*/
+
+ Compatibility Note: these functions are not available with the
+ Apple/NeXT runtime. */
/* Return the size of a variable which has the specified 'type'
encoding. */