diff options
author | nicola <nicola@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-12 16:17:18 +0000 |
---|---|---|
committer | nicola <nicola@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-12 16:17:18 +0000 |
commit | 6ee7a2767f6f0b31bae9ad13066cf9d36663882f (patch) | |
tree | 7e29a3f7298da78a7ec2df063e05a796f6ceb968 /libobjc/objc | |
parent | d8bc803082928434d39c7ab25b322f7066603de6 (diff) | |
download | gcc-6ee7a2767f6f0b31bae9ad13066cf9d36663882f.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165386 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libobjc/objc')
-rw-r--r-- | libobjc/objc/objc-decls.h | 14 | ||||
-rw-r--r-- | libobjc/objc/runtime.h | 30 |
2 files changed, 36 insertions, 8 deletions
diff --git a/libobjc/objc/objc-decls.h b/libobjc/objc/objc-decls.h index e5388e33c4c..b3cfb2120f2 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 b5ae87bc7c8..6efe78d6fce 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. */ |