diff mbox

=?UTF-8?Q?libobjc:=20header=20cleanup=20for=20new=20API=20(15)?=

Message ID 1292932223.796531175@192.168.2.228
State New
Headers show

Commit Message

Nicola Pero Dec. 21, 2010, 11:50 a.m. UTC
This patch moves DEBUG_PRINTF to objc-private/common.h, so that hash.c
no longer includes a mass of Objective-C runtime function declarations
that it doesn't use.

Committed to trunk.

Thanks
diff mbox

Patch

Index: objc-private/runtime.h
===================================================================
--- objc-private/runtime.h      (revision 168108)
+++ objc-private/runtime.h      (working copy)
@@ -77,12 +77,6 @@ 
 /* Number of threads which are alive. */
 extern int __objc_runtime_threads_alive;
 
-#ifdef DEBUG
-#define DEBUG_PRINTF(format, args...) printf (format, ## args)
-#else
-#define DEBUG_PRINTF(format, args...)
-#endif 
-
 BOOL __objc_responds_to (id object, SEL sel); /* for internal use only! */
 extern void __objc_generate_gc_type_description (Class);
 
Index: objc-private/common.h
===================================================================
--- objc-private/common.h       (revision 168108)
+++ objc-private/common.h       (working copy)
@@ -26,13 +26,17 @@ 
 #define __objc_private_common_INCLUDE_GNU
 
 /* This file contains definitions that should be included by all .c
-   and .m files in libobjc.
-*/
+   and .m files in libobjc.  */
 
 /* This variable allows the public headers to determine when they are
    being included by a file inside libobjc itself, or when they are
-   being included by an external file.
-*/
+   being included by an external file.  */
 #define GNU_LIBOBJC_COMPILING_LIBOBJC_ITSELF 1
 
+#ifdef DEBUG
+#define DEBUG_PRINTF(format, args...) printf (format, ## args)
+#else
+#define DEBUG_PRINTF(format, args...)
+#endif 
+
 #endif /* __objc_private_common_INCLUDE_GNU */
Index: hash.c
===================================================================
--- hash.c      (revision 168110)
+++ hash.c      (working copy)
@@ -26,9 +26,7 @@ 
 #include <assert.h>               /* For assert.  */
 
 #include "objc/runtime.h"         /* For objc_calloc.  */
-#include "objc/thr.h"             /* Required by objc-private/runtime.h.  */
 #include "objc-private/hash.h"
-#include "objc-private/runtime.h" /* for DEBUG_PRINTF.  */
 
 /* These two macros determine when a hash table is full and
    by how much it should be expanded respectively.
Index: ChangeLog
===================================================================
--- ChangeLog   (revision 168110)
+++ ChangeLog   (working copy)
@@ -1,4 +1,10 @@ 
 2010-12-21  Nicola Pero  <nicola.pero@meta-innovation.com>
+
+       * objc-private/runtime.h (DEBUG_PRINTF): Moved from here ...
+       * objc-private/common.h (DEBUG_PRINTF): To here.
+       * hash.c: Do not include objc-private/runtime.h and objc/thr.h.
+
+2010-12-21  Nicola Pero  <nicola.pero@meta-innovation.com>
 
        * hash.c: Tidied up comments and indentation.  No code changes.