summaryrefslogtreecommitdiff
path: root/libobjc/init.c
diff options
context:
space:
mode:
authorNicola Pero <nicola.pero@meta-innovation.com>2010-12-21 12:49:26 +0000
committerNicola Pero <nicola@gcc.gnu.org>2010-12-21 12:49:26 +0000
commit600cbba24eabcc0ec3802e44408f4cd65816fcbf (patch)
treeda80c7ab199492b7389004929895a22823b5f659 /libobjc/init.c
parentbebf8772de79a91c76ad95274228f5e27a5ed140 (diff)
In libobjc/: 2010-12-21 Nicola Pero <nicola.pero@meta-innovation.com>
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. From-SVN: r168113
Diffstat (limited to 'libobjc/init.c')
-rw-r--r--libobjc/init.c19
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. */