]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
In libobjc/: 2010-12-15 Nicola Pero <nicola.pero@meta-innovation.com>
authorNicola Pero <nicola.pero@meta-innovation.com>
Wed, 15 Dec 2010 01:35:20 +0000 (01:35 +0000)
committerNicola Pero <nicola@gcc.gnu.org>
Wed, 15 Dec 2010 01:35:20 +0000 (01:35 +0000)
In libobjc/:
2010-12-15  Nicola Pero  <nicola.pero@meta-innovation.com>

* ivars.c (class_addIvar): Use the 'size' argument instead of
trying to calculate it using objc_sizeof_type().
* objc/runtime.h (class_addIvar): Updated comments.

From-SVN: r167837

libobjc/ChangeLog
libobjc/ivars.c
libobjc/objc/runtime.h

index 7b3495a73aea0f073830538be656bef34c2ced6e..2a9de964d79238c2058a1fb59453376d73ab900e 100644 (file)
@@ -1,3 +1,9 @@
+2010-12-15  Nicola Pero  <nicola.pero@meta-innovation.com>
+
+       * ivars.c (class_addIvar): Use the 'size' argument instead of
+       trying to calculate it using objc_sizeof_type().
+       * objc/runtime.h (class_addIvar): Updated comments.
+       
 2010-12-15  Nicola Pero  <nicola.pero@meta-innovation.com>
 
        * sendmsg.c: Reindented some code and tidied up comments.  No
index 69524bfd1ddbec9f3ad09470a6b1f814130b3a98..65de497fc89e3e3490b990b53ffa2916dd80874f 100644 (file)
@@ -296,7 +296,7 @@ class_addIvar (Class class_, const char * ivar_name, size_t size,
     else
       ivar->ivar_offset = class_->instance_size - misalignment + alignment;
     
-    class_->instance_size = ivar->ivar_offset + objc_sizeof_type (ivar->ivar_type);
+    class_->instance_size = ivar->ivar_offset + size;
   }
   
   return YES;
index f5df691fe5279af778245190843c9dc6f0b821af..94f5bf7f10aea8fc83d16d840debdcb9550b8722 100644 (file)
@@ -319,11 +319,10 @@ objc_EXPORT Ivar * class_copyIvarList (Class class_, unsigned int *numberOfRetur
    instance variables to classes already registered with the runtime.
    'size' is the size of the instance variable, 'alignment' the
    alignment, and 'type' the type encoding of the variable type.  You
-   can use objc_sizeof_type() (or sizeof()), objc_alignof_type() (or
-   __alignof__()) and @encode() to determine the right 'size',
-   'alignment' and 'type' for your instance variable.  For example, to
-   add an instance variable name "my_variable" and of type 'id', you
-   can use:
+   can use sizeof(), __alignof__() and @encode() to determine the
+   right 'size', 'alignment' and 'type' for your instance variable.
+   For example, to add an instance variable name "my_variable" and of
+   type 'id', you can use:
 
    class_addIvar (class, "my_variable", sizeof (id), __alignof__ (id), 
                   @encode (id));