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

login
register
mail settings
Submitter Nicola Pero
Date Dec. 19, 2010, 12:29 a.m.
Message ID <1292718565.373214880@192.168.2.229>
Download mbox | patch
Permalink /patch/76105/
State New
Headers show

Comments

Nicola Pero - Dec. 19, 2010, 12:29 a.m.
I'm reviewing the libobjc headers - checking that functions, types, etc.
in the new and old APIs are defined in the right header, tidying up comments
and fixing other minor details left lose when the new API was added.

Please bear with me with the following sequence of patches - each of them is
basically a very small bufix/tidyup of the libobjc headers.  I should be finished
in a couple of days.

This first patch just removes a TODO and moves a private declaration in the right header
file.

Committed to trunk.

Thanks

Patch

Index: init.c
===================================================================
--- init.c      (revision 168034)
+++ init.c      (working copy)
@@ -32,6 +32,7 @@ 
 #include "objc-private/objc-list.h" 
 #include "objc-private/module-abi-8.h" 
 #include "objc-private/runtime.h"
+#include "objc-private/selector.h"  /* For __sel_register_typed_name().  */
 #include "objc-private/objc-sync.h" /* For __objc_sync_init() */
 #include "objc-private/protocols.h" /* For __objc_protocols_init(),
                                       __objc_protocols_add_protocol()
@@ -92,11 +93,6 @@ 
 /* Are all categories/classes resolved?  */
 BOOL __objc_dangling_categories = NO;           /* !T:UNUSED */
 
-/* TODO: This needs to go into objc-private/selector.h.  */
-extern SEL
-__sel_register_typed_name (const char *name, const char *types, 
-                          struct objc_selector *orig, BOOL is_const);
-
 /* Sends +load to all classes and categories in certain
    situations.  */
 static void objc_send_load (void);
Index: objc-private/selector.h
===================================================================
--- objc-private/selector.h     (revision 168034)
+++ objc-private/selector.h     (working copy)
@@ -45,6 +45,10 @@ 
 SEL
 sel_get_any_uid (const char *name);
 
+SEL
+__sel_register_typed_name (const char *name, const char *types, 
+                          struct objc_selector *orig, BOOL is_const);
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */
Index: selector.c
===================================================================
--- selector.c  (revision 168034)
+++ selector.c  (working copy)
@@ -30,6 +30,7 @@ 
 #include "objc-private/module-abi-8.h"
 #include "objc-private/runtime.h"
 #include "objc-private/sarray.h"
+#include "objc-private/selector.h"
 
 /* Initial selector hash table size. Value doesn't matter much.  */
 #define SELECTOR_HASH_SIZE 128
Index: ChangeLog
===================================================================
--- ChangeLog   (revision 168034)
+++ ChangeLog   (working copy)
@@ -1,3 +1,10 @@ 
+2010-12-19  Nicola Pero  <nicola.pero@meta-innovation.com>
+
+       * init.c: Include objc-private/selector.h.  Do not declare
+       __sel_register_typed_name.
+       * objc-private/selector.h (__sel_register_typed_name): Declare.
+       * selector.c: Include objc-private/selector.h.
+       
 2010-12-18  Nicola Pero  <nicola.pero@meta-innovation.com>
 
        * class.c: Tidied up comments and indentation.  No code changes.