From 600cbba24eabcc0ec3802e44408f4cd65816fcbf Mon Sep 17 00:00:00 2001 From: Nicola Pero Date: Tue, 21 Dec 2010 12:49:26 +0000 Subject: In libobjc/: 2010-12-21 Nicola Pero In libobjc/: 2010-12-21 Nicola Pero * 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 --- libobjc/init.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) (limited to 'libobjc/init.c') diff --git a/libobjc/init.c b/libobjc/init.c index f1eb83a..0e0d372 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. */ -- cgit v1.1