summaryrefslogtreecommitdiff
path: root/libobjc
diff options
context:
space:
mode:
authorktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4>2008-06-10 12:37:51 +0000
committerktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4>2008-06-10 12:37:51 +0000
commit61b5267da8c51269354415bf4b3a933033f9480a (patch)
tree4bffe4a7edbb45a1aac069692d728ff3cb979816 /libobjc
parentc9021e73584e339db41ca30e15270708ff7e5fbe (diff)
downloadgcc-61b5267da8c51269354415bf4b3a933033f9480a.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@136617 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libobjc')
-rw-r--r--libobjc/ChangeLog9
-rw-r--r--libobjc/Object.m2
-rw-r--r--libobjc/archive.c2
-rw-r--r--libobjc/objc/Object.h2
-rw-r--r--libobjc/sendmsg.c8
5 files changed, 17 insertions, 6 deletions
diff --git a/libobjc/ChangeLog b/libobjc/ChangeLog
index fa0e059e089..b623679ca61 100644
--- a/libobjc/ChangeLog
+++ b/libobjc/ChangeLog
@@ -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
diff --git a/libobjc/Object.m b/libobjc/Object.m
index 3d7d2084b32..1830acf4502 100644
--- a/libobjc/Object.m
+++ b/libobjc/Object.m
@@ -115,7 +115,7 @@ extern int errno;
return self==anObject;
}
-- (int)compare:anotherObject;
+- (int)compare:(id)anotherObject;
{
if ([self isEqual:anotherObject])
return 0;
diff --git a/libobjc/archive.c b/libobjc/archive.c
index 992a69600d4..b3af32d248a 100644
--- a/libobjc/archive.c
+++ b/libobjc/archive.c
@@ -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)
diff --git a/libobjc/objc/Object.h b/libobjc/objc/Object.h
index 7b67f46615c..04d953d56b4 100644
--- a/libobjc/objc/Object.h
+++ b/libobjc/objc/Object.h
@@ -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;
diff --git a/libobjc/sendmsg.c b/libobjc/sendmsg.c
index a0b66baf6a2..b132a153ff3 100644
--- a/libobjc/sendmsg.c
+++ b/libobjc/sendmsg.c
@@ -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);