]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Object.m (compare): Add type id.
authorKai Tietz <kai.tietz@onevision.com>
Tue, 10 Jun 2008 12:37:51 +0000 (12:37 +0000)
committerKai Tietz <ktietz@gcc.gnu.org>
Tue, 10 Jun 2008 12:37:51 +0000 (14:37 +0200)
2008-06-10  Kai Tietz  <kai.tietz@onevision.com>

* Object.m (compare): Add type id.
* objc/Object.h: Likewise.
* archive.c (objc_read_class): Use size_t to extend version to be
size of pointer scalar width.
* sendmsg.c (rtx): Undefine it before redefinition.
(__objc_print_dtable_stats): Cast arguments to long as intended.

From-SVN: r136617

libobjc/ChangeLog
libobjc/Object.m
libobjc/archive.c
libobjc/objc/Object.h
libobjc/sendmsg.c

index fa0e059e089cf1b8d161a5837a710d89a3ef5508..b623679ca613c0476df80563d0167d551bd7c27c 100644 (file)
@@ -1,3 +1,12 @@
+2008-06-10  Kai Tietz  <kai.tietz@onevision.com>
+
+       * Object.m (compare): Add type id.
+       * objc/Object.h: Likewise.
+       * archive.c (objc_read_class): Use size_t to extend version to be
+       size of pointer scalar width.
+       * sendmsg.c (rtx): Undefine it before redefinition.
+       (__objc_print_dtable_stats): Cast arguments to long as intended.
+
 2008-05-30  Julian Brown  <julian@codesourcery.com>
 
        * exception.c (__objc_exception_class): Initialise as constant
index 3d7d2084b32c51c47d89bcda8eb29c189482bdea..1830acf4502a05d87edff1b16b743debfa9fcf81 100644 (file)
@@ -115,7 +115,7 @@ extern int errno;
   return self==anObject;
 }
 
-- (int)compare:anotherObject;
+- (int)compare:(id)anotherObject;
 {
   if ([self isEqual:anotherObject])
     return 0;
index 992a69600d4a3295cddd0438cbf4f1a298c9b006..b3af32d248a90d154874044b21860013212025a2 100644 (file)
@@ -908,7 +908,7 @@ objc_read_class (struct objc_typed_stream *stream, Class *class)
 
          objc_read_unsigned_long (stream, &version);
          objc_hash_add (&stream->class_table,
-                        (*class)->name, (void *)version);
+                        (*class)->name, (void *) ((size_t) version));
        }
 
       else if ((buf[0]&_B_CODE) == _B_UCOMM)
index 7b67f46615c62d9a4cee5800af278965461a9e56..04d953d56b42a0ac0a44d4194d0c6cb120d1e53f 100644 (file)
@@ -66,7 +66,7 @@ extern "C" {
 - self;
 - (unsigned int)hash;
 - (BOOL)isEqual:anObject;
-- (int)compare:anotherObject;
+- (int)compare:(id)anotherObject;
 
         /* Testing object type */
 - (BOOL)isMetaClass;
index a0b66baf6a2e3e923c0fb93c30c30ef98caf7404..b132a153ff32ef1630612477d8553d4687d07efe 100644 (file)
@@ -41,6 +41,8 @@ Boston, MA 02110-1301, USA.  */
 #define gen_rtx(args...) 1
 #define gen_rtx_MEM(args...) 1
 #define gen_rtx_REG(args...) 1
+/* Alread defined in gcc/coretypes.h. So prevent double definition warning.  */
+#undef rtx
 #define rtx int
 
 #if ! defined (STRUCT_VALUE) || STRUCT_VALUE == 0
@@ -685,14 +687,14 @@ __objc_print_dtable_stats ()
 #endif
 
   printf ("arrays: %d = %ld bytes\n", narrays, 
-         (long) narrays * sizeof (struct sarray));
+         (long) (narrays * sizeof (struct sarray)));
   total += narrays * sizeof (struct sarray);
   printf ("buckets: %d = %ld bytes\n", nbuckets, 
-         (long) nbuckets * sizeof (struct sbucket));
+         (long) (nbuckets * sizeof (struct sbucket)));
   total += nbuckets * sizeof (struct sbucket);
 
   printf ("idxtables: %d = %ld bytes\n",
-         idxsize, (long) idxsize * sizeof (void *));
+         idxsize, (long) (idxsize * sizeof (void *)));
   total += idxsize * sizeof (void *);
   printf ("-----------------------------------\n");
   printf ("total: %d bytes\n", total);