X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=libobjc%2Fselector.c;h=223c7100efa56dcddba58ffda8e79f3cd53602f5;hb=3d203535dfdd2f10c778354292ce6ea04ed8042b;hp=5ff0d8c71e24c293dd523bd7842ef1cb47cbb4e5;hpb=dd86e3be8a57b4e8df35d31d817e0434613562bd;p=pf3gnuchains%2Fgcc-fork.git diff --git a/libobjc/selector.c b/libobjc/selector.c index 5ff0d8c71e2..223c7100efa 100644 --- a/libobjc/selector.c +++ b/libobjc/selector.c @@ -15,7 +15,7 @@ details. You should have received a copy of the GNU General Public License along with GCC; see the file COPYING. If not, write to the Free Software -Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* As a special exception, if you link this library with files compiled with GCC to produce an executable, this does not cause the resulting executable @@ -23,9 +23,9 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ -#include "runtime.h" -#include "sarray.h" -#include "encoding.h" +#include "objc/runtime.h" +#include "objc/sarray.h" +#include "objc/encoding.h" /* Initial selector hash table size. Value doesn't matter much */ #define SELECTOR_HASH_SIZE 128 @@ -38,14 +38,14 @@ static cache_ptr __objc_selector_hash = 0; /* name -> uid !T:MUTEX */ /* Number of selectors stored in each of the above tables */ unsigned int __objc_selector_max_index = 0; /* !T:MUTEX */ -void __objc_init_selector_tables () +void __objc_init_selector_tables (void) { __objc_selector_array = sarray_new (SELECTOR_HASH_SIZE, 0); __objc_selector_names = sarray_new (SELECTOR_HASH_SIZE, 0); __objc_selector_hash - = hash_new (SELECTOR_HASH_SIZE, - (hash_func_type) hash_string, - (compare_func_type) compare_strings); + = objc_hash_new (SELECTOR_HASH_SIZE, + (hash_func_type) objc_hash_string, + (compare_func_type) objc_compare_strings); } /* This routine is given a class and records all of the methods in its class @@ -195,7 +195,7 @@ sel_get_typed_uid (const char *name, const char *types) objc_mutex_lock (__objc_runtime_mutex); - i = (sidx) hash_value_for_key (__objc_selector_hash, name); + i = (sidx) objc_hash_value_for_key (__objc_selector_hash, name); if (i == 0) { objc_mutex_unlock (__objc_runtime_mutex); @@ -235,7 +235,7 @@ sel_get_any_typed_uid (const char *name) objc_mutex_lock (__objc_runtime_mutex); - i = (sidx) hash_value_for_key (__objc_selector_hash, name); + i = (sidx) objc_hash_value_for_key (__objc_selector_hash, name); if (i == 0) { objc_mutex_unlock (__objc_runtime_mutex); @@ -266,7 +266,7 @@ sel_get_any_uid (const char *name) objc_mutex_lock (__objc_runtime_mutex); - i = (sidx) hash_value_for_key (__objc_selector_hash, name); + i = (sidx) objc_hash_value_for_key (__objc_selector_hash, name); if (soffset_decode (i) == 0) { objc_mutex_unlock (__objc_runtime_mutex); @@ -368,7 +368,7 @@ __sel_register_typed_name (const char *name, const char *types, sidx i; struct objc_list *l; - i = (sidx) hash_value_for_key (__objc_selector_hash, name); + i = (sidx) objc_hash_value_for_key (__objc_selector_hash, name); if (soffset_decode (i) != 0) { for (l = (struct objc_list *) sarray_get_safe (__objc_selector_array, i); @@ -453,7 +453,7 @@ __sel_register_typed_name (const char *name, const char *types, sarray_at_put_safe (__objc_selector_names, i, (void *) new_name); sarray_at_put_safe (__objc_selector_array, i, (void *) l); if (is_new) - hash_add (&__objc_selector_hash, (void *) new_name, (void *) i); + objc_hash_add (&__objc_selector_hash, (void *) new_name, (void *) i); } sarray_realloc (__objc_uninstalled_dtable, __objc_selector_max_index + 1);