diff options
author | nicola <nicola@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-12-21 12:49:26 +0000 |
---|---|---|
committer | nicola <nicola@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-12-21 12:49:26 +0000 |
commit | 33f86c6fbd972c6003462823660f2ae7066a9d34 (patch) | |
tree | da80c7ab199492b7389004929895a22823b5f659 /libobjc/init.c | |
parent | 86655cbff66671fa3d7ec45712671536cbd78e28 (diff) | |
download | gcc-33f86c6fbd972c6003462823660f2ae7066a9d34.tar.gz |
In libobjc/:
2010-12-21 Nicola Pero <nicola.pero@meta-innovation.com>
* objc-private/module-abi-8.h (struct objc_symtab): Declare 'refs'
to be 'struct objc_selector *' and not 'SEL'.
* init.c (__objc_exec_class): Call
__objc_register_selectors_from_module instead of iterating over
each selector and calling __sel_register_typed_name for each.
* objc-private/selector.h: Declare
__objc_register_selectors_from_module instead of
__sel_register_typed_name.
* selector.c (__objc_register_selectors_from_module): New.
(__sel_register_typed_name): Made static.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168113 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libobjc/init.c')
-rw-r--r-- | libobjc/init.c | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/libobjc/init.c b/libobjc/init.c index f1eb83ab1d2..0e0d372adad 100644 --- a/libobjc/init.c +++ b/libobjc/init.c @@ -549,7 +549,7 @@ __objc_exec_class (struct objc_module *module) struct objc_list **cell; /* The table of selector references for this module. */ - SEL selectors = symtab->refs; + struct objc_selector *selectors = symtab->refs; int i; @@ -585,22 +585,9 @@ __objc_exec_class (struct objc_module *module) objc_mutex_lock (__objc_runtime_mutex); __objc_module_list = list_cons (module, __objc_module_list); - /* Replace referenced selectors from names to SEL's. */ + /* Replace referenced selectors from names to SELs. */ if (selectors) - { - for (i = 0; selectors[i].sel_id; ++i) - { - const char *name, *type; - name = (char *) selectors[i].sel_id; - type = (char *) selectors[i].sel_types; - /* Constructors are constant static data so we can safely - store pointers to them in the runtime - structures. is_const == YES. */ - __sel_register_typed_name (name, type, - (struct objc_selector *) &(selectors[i]), - YES); - } - } + __objc_register_selectors_from_module (selectors); /* Parse the classes in the load module and gather selector information. */ |