diff options
author | nicola <nicola@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-12-17 17:23:09 +0000 |
---|---|---|
committer | nicola <nicola@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-12-17 17:23:09 +0000 |
commit | 0ddb9c7616385eaa1206b248adfe883f0f1fc2b0 (patch) | |
tree | 4eb905ba4ca8172862a389da922d610ab441b8a7 /libobjc | |
parent | 8cd78fca7cc4e85d1e3f575761f7971dccca4581 (diff) | |
download | gcc-0ddb9c7616385eaa1206b248adfe883f0f1fc2b0.tar.gz |
Fixed bug in loading of categories under certain special circumstances
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@48110 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libobjc')
-rw-r--r-- | libobjc/ChangeLog | 8 | ||||
-rw-r--r-- | libobjc/init.c | 6 |
2 files changed, 11 insertions, 3 deletions
diff --git a/libobjc/ChangeLog b/libobjc/ChangeLog index 1bce3f81ace..8716284bbfd 100644 --- a/libobjc/ChangeLog +++ b/libobjc/ChangeLog @@ -1,3 +1,11 @@ +Mon Dec 17 17:02:12 2001 Nicola Pero <nicola@brainstorm.co.uk> + + * init.c (__objc_exec_class): Fixed bug in the loop on unclaimed + categories - when an unclaimed category was found, the loop was + doing two steps forward instead of one, so that in certain cases + it was failing to properly load all the categories. (Reported + with fix by Alexander Malmberg <alexander@malmberg.org>). + 2001-11-14 Aldy Hernandez <aldyh@redhat.com> * encoding.c: Add target_flags. diff --git a/libobjc/init.c b/libobjc/init.c index 29ce6393eb7..552a74bb549 100644 --- a/libobjc/init.c +++ b/libobjc/init.c @@ -599,9 +599,7 @@ __objc_exec_class (Module_t module) /* Scan the unclaimed category hash. Attempt to attach any unclaimed categories to objects. */ - for (cell = &unclaimed_categories; - *cell; - ({ if (*cell) cell = &(*cell)->tail; })) + for (cell = &unclaimed_categories; *cell; ) { Category_t category = (*cell)->head; Class class = objc_lookup_class (category->class_name); @@ -630,6 +628,8 @@ __objc_exec_class (Module_t module) only done for root classes. */ __objc_register_instance_methods_to_class(class); } + else + cell = &(*cell)->tail; } if (unclaimed_proto_list && objc_lookup_class ("Protocol")) |