diff mbox

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

Message ID 1292770620.493427194@192.168.2.227
State New
Headers show

Commit Message

Nicola Pero Dec. 19, 2010, 2:57 p.m. UTC
This patch declares in objc/runtime.h a function (class_ivar_set_gcinvisible)
that existed in the old API and should still exist in the new API (at least until
we review GC if we want to), but that I had forgotten to declare.

It also removes a #define in sendmsg.c that had been added as a temporary hack
during the header reorganization and is no longer needed.

Committed.

Thanks
diff mbox

Patch

Index: sendmsg.c
===================================================================
--- sendmsg.c   (revision 168050)
+++ sendmsg.c   (working copy)
@@ -44,10 +44,6 @@ 
 #include <assert.h> /* For assert */
 #include <string.h> /* For strlen */
 
-/* Temporarily while we include objc/objc-api.h instead of objc-private/module-abi-8.h.  */
-#define _CLS_IN_CONSTRUCTION 0x10L
-#define CLS_IS_IN_CONSTRUCTION(cls) __CLS_ISINFO(cls, _CLS_IN_CONSTRUCTION)
-
 /* This is how we hack STRUCT_VALUE to be 1 or 0.   */
 #define gen_rtx(args...) 1
 #define gen_rtx_MEM(args...) 1
@@ -331,7 +327,8 @@ 
   return get_imp (class_, selector);
 }
 
-/* Given a method, return its implementation.  */
+/* Given a method, return its implementation.  This has been replaced
+   by method_getImplementation() in the modern API.  */
 IMP
 method_get_imp (struct objc_method * method)
 {
Index: ChangeLog
===================================================================
--- ChangeLog   (revision 168051)
+++ ChangeLog   (working copy)
@@ -1,5 +1,11 @@ 
 2010-12-19  Nicola Pero  <nicola.pero@meta-innovation.com>
 
+       * objc/runtime.h (class_ivar_set_gcinvisible): Declare.
+       * sendmsg.c (_CLS_IN_CONSTRUCTION, CLS_IS_IN_CONSTRUCTION): Do not
+       define.  Updated comments.
+       
+2010-12-19  Nicola Pero  <nicola.pero@meta-innovation.com>
+
        * objc/encoding.h: Updated comments.
        * objc/runtime.h: Updated comments.
        (objc_setGetUnknownClassHandler): Mark with objc_EXPORT.
Index: objc/runtime.h
===================================================================
--- objc/runtime.h      (revision 168051)
+++ objc/runtime.h      (working copy)
@@ -962,6 +962,15 @@ 
 objc_EXPORT void objc_free(void *mem);
 
 
+/** Implementation: the following functions are in gc.c.  */
+
+/* Mark the instance variable as inaccessible to the garbage
+   collector.  */
+objc_EXPORT void class_ivar_set_gcinvisible (Class _class,
+                                            const char* ivarname,
+                                            BOOL gcInvisible);
+
+
 /** Implementation: the following functions are in encoding.c.  */
 
 /* Traditional GNU Objective-C Runtime functions that are currently