Commit 718a8e53 by Nicola Pero Committed by Nicola Pero

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
parent 729530c0
2010-10-12 Nicola Pero <nicola.pero@meta-innovation.com> 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.
2010-10-12 Nicola Pero <nicola.pero@meta-innovation.com>
* Makefile.in (C_SOURCE_FILES): Added protocols.c. * Makefile.in (C_SOURCE_FILES): Added protocols.c.
* objc-private/protocols.h: New. * objc-private/protocols.h: New.
* protocols.c: New. * protocols.c: New.
......
...@@ -27,7 +27,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see ...@@ -27,7 +27,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include "objc-private/common.h" #include "objc-private/common.h"
#include "objc-private/error.h" #include "objc-private/error.h"
#include "tconfig.h" #include "tconfig.h"
#include "objc/objc.h"
#include "objc/objc-api.h" #include "objc/objc-api.h"
#include "objc/hash.h" #include "objc/hash.h"
#include "objc/objc-list.h" #include "objc/objc-list.h"
......
...@@ -89,7 +89,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see ...@@ -89,7 +89,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include "objc-private/common.h" #include "objc-private/common.h"
#include "objc-private/error.h" #include "objc-private/error.h"
#include "objc/objc.h"
#include "objc/objc-api.h" #include "objc/objc-api.h"
#include "objc/thr.h" #include "objc/thr.h"
#include "objc-private/runtime.h" /* the kitchen sink */ #include "objc-private/runtime.h" /* the kitchen sink */
......
...@@ -36,9 +36,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see ...@@ -36,9 +36,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include "tconfig.h" #include "tconfig.h"
#include "coretypes.h" #include "coretypes.h"
#include "tm.h" #include "tm.h"
#include "objc/objc-api.h" #include "objc/runtime.h"
#include "objc/encoding.h" #include "objc-private/module-abi-8.h" /* For struct objc_method */
#include <stdlib.h> #include <stdlib.h>
#include <ctype.h>
#undef MAX #undef MAX
#define MAX(X, Y) \ #define MAX(X, Y) \
......
...@@ -48,8 +48,7 @@ _objc_abort (const char *fmt, ...) ...@@ -48,8 +48,7 @@ _objc_abort (const char *fmt, ...)
} }
/* The rest of the file is deprecated. */ /* The rest of the file is deprecated. */
#include "objc/objc.h" #include "objc/objc-api.h" /* For objc_error_handler. */
#include "objc/objc-api.h"
/* /*
** Error handler function ** Error handler function
......
...@@ -24,15 +24,15 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see ...@@ -24,15 +24,15 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
#include "objc-private/common.h" #include "objc-private/common.h"
#include "tconfig.h"
#include "objc/objc.h" #include "objc/objc.h"
#include "objc/encoding.h"
#if OBJC_WITH_GC
#include "tconfig.h"
#include <assert.h> #include <assert.h>
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
#include "objc/encoding.h"
#if OBJC_WITH_GC
#include <gc.h> #include <gc.h>
#include <limits.h> #include <limits.h>
......
...@@ -25,8 +25,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see ...@@ -25,8 +25,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include "objc-private/common.h" #include "objc-private/common.h"
#include <assert.h> /* For assert */ #include <assert.h> /* For assert */
#include "objc/objc.h" #include "objc/runtime.h" /* For objc_calloc */
#include "objc/objc-api.h" #include "objc/thr.h" /* Required by objc-private/runtime.h. */
#include "objc-private/hash.h" #include "objc-private/hash.h"
#include "objc-private/runtime.h" /* for DEBUG_PRINTF */ #include "objc-private/runtime.h" /* for DEBUG_PRINTF */
......
...@@ -26,7 +26,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see ...@@ -26,7 +26,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include "objc-private/common.h" #include "objc-private/common.h"
#include "objc-private/error.h" #include "objc-private/error.h"
#include "objc/objc.h"
#include "objc/objc-api.h" #include "objc/objc-api.h"
#include "objc/thr.h" #include "objc/thr.h"
#include "objc-private/hash.h" #include "objc-private/hash.h"
......
...@@ -23,8 +23,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see ...@@ -23,8 +23,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
#include "objc-private/common.h" #include "objc-private/common.h"
#include "objc/objc.h" #include "objc/runtime.h"
#include "objc/objc-api.h" #include "objc-private/module-abi-8.h" /* For runtime structures */
#include "objc/thr.h"
#include "objc-private/runtime.h" /* the kitchen sink */ #include "objc-private/runtime.h" /* the kitchen sink */
#include <string.h> /* For strcmp */ #include <string.h> /* For strcmp */
......
...@@ -28,8 +28,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see ...@@ -28,8 +28,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include <objc/NXConstStr.h> #include <objc/NXConstStr.h>
/* Generate references to Object and NXConstanstString classes since they are /* Generate references to Object and NXConstanstString classes since they are
needed by the runtime system to run correctly. */ needed by the runtime system to run correctly. */
void __objc_linking (void) void __objc_linking (void)
{ {
......
...@@ -42,8 +42,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see ...@@ -42,8 +42,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#define __USE_FIXED_PROTOTYPES__ #define __USE_FIXED_PROTOTYPES__
#include <stdlib.h> #include <stdlib.h>
#include "objc/objc.h" #include "objc/runtime.h"
#include "objc/objc-api.h"
#if OBJC_WITH_GC #if OBJC_WITH_GC
#include <gc.h> #include <gc.h>
......
...@@ -34,7 +34,8 @@ The original list was: ...@@ -34,7 +34,8 @@ The original list was:
but can almost certainly be shrinked down. but can almost certainly be shrinked down.
*/ Note that you can use this file both with objc/objc-api.h and with
objc/runtime.h. */
#ifndef __objc_private_runtime_INCLUDE_GNU #ifndef __objc_private_runtime_INCLUDE_GNU
#define __objc_private_runtime_INCLUDE_GNU #define __objc_private_runtime_INCLUDE_GNU
......
...@@ -79,7 +79,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see ...@@ -79,7 +79,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include "objc-private/common.h" #include "objc-private/common.h"
#include "objc/objc-sync.h" /* For objc_sync_enter(), objc_sync_exit() */ #include "objc/objc-sync.h" /* For objc_sync_enter(), objc_sync_exit() */
#include "objc/objc-api.h" /* For objc_malloc() */ #include "objc/runtime.h" /* For objc_malloc() */
#include "objc/thr.h" /* For objc_mutex_loc() and similar */ #include "objc/thr.h" /* For objc_mutex_loc() and similar */
#include "objc-private/objc-sync.h" /* For __objc_sync_init() */ #include "objc-private/objc-sync.h" /* For __objc_sync_init() */
......
...@@ -28,13 +28,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see ...@@ -28,13 +28,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#if defined (_WIN32) || defined (__WIN32__) || defined (WIN32) #if defined (_WIN32) || defined (__WIN32__) || defined (WIN32)
# ifdef DLL_EXPORT /* defined by libtool (if required) */ # ifdef DLL_EXPORT /* defined by libtool (if required) */
# define objc_EXPORT # define objc_EXPORT
# define objc_DECLARE # define objc_DECLARE
#else # else
# define objc_EXPORT extern __declspec(dllimport) # define objc_EXPORT extern __declspec(dllimport)
# define objc_DECLARE extern __declspec(dllimport) # define objc_DECLARE extern __declspec(dllimport)
#endif # endif
#else #else
......
...@@ -48,6 +48,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see ...@@ -48,6 +48,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
/* TODO: This file is incomplete. */ /* TODO: This file is incomplete. */
#include "objc.h" #include "objc.h"
#include "objc-decls.h"
/* An 'Ivar' represents an instance variable. It holds information /* An 'Ivar' represents an instance variable. It holds information
about the name, type and offset of the instance variable. */ about the name, type and offset of the instance variable. */
...@@ -543,11 +544,38 @@ struct __objcFastEnumerationState ...@@ -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. */ /** Implementation: the following functions are in encoding.c. */
/* Traditional GNU Objective-C Runtime functions that are currently /* Traditional GNU Objective-C Runtime functions that are currently
used to implement method forwarding. 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' /* Return the size of a variable which has the specified 'type'
encoding. */ encoding. */
......
...@@ -23,7 +23,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see ...@@ -23,7 +23,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
#include "objc-private/common.h" #include "objc-private/common.h"
#include "objc/objc.h"
#include "objc/objc-api.h" #include "objc/objc-api.h"
#include "objc-private/runtime.h" /* the kitchen sink */ #include "objc-private/runtime.h" /* the kitchen sink */
......
...@@ -23,7 +23,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see ...@@ -23,7 +23,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
#include "objc-private/common.h" #include "objc-private/common.h"
#include "objc/objc.h"
#include "objc/runtime.h" #include "objc/runtime.h"
#include "objc-private/module-abi-8.h" /* For runtime structures */ #include "objc-private/module-abi-8.h" /* For runtime structures */
#include "objc/thr.h" #include "objc/thr.h"
......
...@@ -24,9 +24,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see ...@@ -24,9 +24,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include "objc-private/common.h" #include "objc-private/common.h"
#include "objc-private/sarray.h" #include "objc-private/sarray.h"
#include "objc/objc.h" #include "objc/runtime.h" /* For objc_malloc */
#include "objc/objc-api.h" #include "objc/thr.h" /* For objc_mutex_lock */
#include "objc/thr.h"
#include "objc-private/runtime.h" #include "objc-private/runtime.h"
#include <stdio.h> #include <stdio.h>
#include <string.h> /* For memset */ #include <string.h> /* For memset */
......
...@@ -23,7 +23,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see ...@@ -23,7 +23,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
#include "objc-private/common.h" #include "objc-private/common.h"
#include "objc/objc.h"
#include "objc/objc-api.h" #include "objc/objc-api.h"
#include "objc/thr.h" #include "objc/thr.h"
#include "objc-private/hash.h" #include "objc-private/hash.h"
......
...@@ -33,7 +33,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see ...@@ -33,7 +33,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include "tconfig.h" #include "tconfig.h"
#include "coretypes.h" #include "coretypes.h"
#include "tm.h" #include "tm.h"
#include "objc/objc.h"
#include "objc/objc-api.h" #include "objc/objc-api.h"
#include "objc/thr.h" #include "objc/thr.h"
#include "objc-private/runtime.h" #include "objc-private/runtime.h"
......
...@@ -38,8 +38,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see ...@@ -38,8 +38,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include "tm.h" #include "tm.h"
#include "defaults.h" #include "defaults.h"
#include "objc/thr.h" #include "objc/thr.h"
#include "objc/objc.h" #include "objc/runtime.h"
#include "objc/objc-api.h"
#include "objc-private/runtime.h" #include "objc-private/runtime.h"
#include <gthr.h> #include <gthr.h>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment