summaryrefslogtreecommitdiff
path: root/libobjc/selector.c
diff options
context:
space:
mode:
authornicola <nicola@138bc75d-0d04-0410-961f-82ee72b054a4>2011-06-07 22:07:48 +0000
committernicola <nicola@138bc75d-0d04-0410-961f-82ee72b054a4>2011-06-07 22:07:48 +0000
commit48cb632404d9b49ca4f04e47de5a40b8165e7e7b (patch)
treee5b82f4dfe9df54ded3816a18f630012d3b9c2a9 /libobjc/selector.c
parent8ce5985492e01af26fb8cabcc38118f8ae0a91e2 (diff)
downloadgcc-48cb632404d9b49ca4f04e47de5a40b8165e7e7b.tar.gz
In libobjc/:
2011-06-07 Nicola Pero <nicola.pero@meta-innovation.com> * objc-private/module-abi-8.h (class_get_instance_size): Removed. * objects.c (class_create_instance): Removed. * error.c (__USE_FIXED_PROTOTYPES__): Removed. * gc.c (__objc_generate_gc_type_description): Use class_getInstanceSize() instead of class_get_instance_size(). * selector.c (sel_types_match): Made static. (sel_get_typed_uid): Removed. (sel_get_any_typed_uid): Removed. (sel_get_name): Removed. (sel_get_type): Removed. (sel_register_name): Removed. (sel_register_typed_name): Removed. (sel_get_uid): Removed. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174773 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libobjc/selector.c')
-rw-r--r--libobjc/selector.c114
1 files changed, 1 insertions, 113 deletions
diff --git a/libobjc/selector.c b/libobjc/selector.c
index 628b4f6f466..55ca7064bd2 100644
--- a/libobjc/selector.c
+++ b/libobjc/selector.c
@@ -227,7 +227,7 @@ sel_isEqual (SEL s1, SEL s2)
/* Return YES iff t1 and t2 have same method types. Ignore the
argframe layout. */
-BOOL
+static BOOL
sel_types_match (const char *t1, const char *t2)
{
if (! t1 || ! t2)
@@ -252,83 +252,6 @@ sel_types_match (const char *t1, const char *t2)
return NO;
}
-/* Return selector representing name. In the Modern API, you'd
- normally use sel_registerTypedName() for this, which does the same
- but would register the selector with the runtime if not registered
- yet (if you only want to check for selectors without registering,
- use sel_copyTypedSelectorList()). */
-SEL
-sel_get_typed_uid (const char *name, const char *types)
-{
- struct objc_list *l;
- sidx i;
-
- objc_mutex_lock (__objc_runtime_mutex);
-
- i = (sidx) objc_hash_value_for_key (__objc_selector_hash, name);
- if (i == 0)
- {
- objc_mutex_unlock (__objc_runtime_mutex);
- return 0;
- }
-
- for (l = (struct objc_list *) sarray_get_safe (__objc_selector_array, i);
- l; l = l->tail)
- {
- SEL s = (SEL) l->head;
- if (types == 0 || s->sel_types == 0)
- {
- if (s->sel_types == types)
- {
- objc_mutex_unlock (__objc_runtime_mutex);
- return s;
- }
- }
- else if (sel_types_match (s->sel_types, types))
- {
- objc_mutex_unlock (__objc_runtime_mutex);
- return s;
- }
- }
-
- objc_mutex_unlock (__objc_runtime_mutex);
- return 0;
-}
-
-/* Return selector representing name; prefer a selector with non-NULL
- type. In the Modern API, sel_getTypedSelector() is similar but
- returns NULL if a typed selector couldn't be found. */
-SEL
-sel_get_any_typed_uid (const char *name)
-{
- struct objc_list *l;
- sidx i;
- SEL s = NULL;
-
- objc_mutex_lock (__objc_runtime_mutex);
-
- i = (sidx) objc_hash_value_for_key (__objc_selector_hash, name);
- if (i == 0)
- {
- objc_mutex_unlock (__objc_runtime_mutex);
- return 0;
- }
-
- for (l = (struct objc_list *) sarray_get_safe (__objc_selector_array, i);
- l; l = l->tail)
- {
- s = (SEL) l->head;
- if (s->sel_types)
- {
- objc_mutex_unlock (__objc_runtime_mutex);
- return s;
- }
- }
-
- objc_mutex_unlock (__objc_runtime_mutex);
- return s;
-}
-
/* Return selector representing name. */
SEL
sel_get_any_uid (const char *name)
@@ -493,15 +416,6 @@ const char *sel_getName (SEL selector)
return ret;
}
-/* Traditional GNU Objective-C Runtime API. */
-const char *sel_get_name (SEL selector)
-{
- if (selector == NULL)
- return 0;
-
- return sel_getName (selector);
-}
-
BOOL
sel_is_mapped (SEL selector)
{
@@ -517,12 +431,6 @@ const char *sel_getTypeEncoding (SEL selector)
return 0;
}
-/* Traditional GNU Objective-C Runtime API. */
-const char *sel_get_type (SEL selector)
-{
- return sel_getTypeEncoding (selector);
-}
-
/* The uninstalled dispatch table. */
extern struct sarray *__objc_uninstalled_dtable;
@@ -707,13 +615,6 @@ sel_registerName (const char *name)
return ret;
}
-/* Traditional GNU Objective-C Runtime API. */
-SEL
-sel_register_name (const char *name)
-{
- return sel_registerName (name);
-}
-
SEL
sel_registerTypedName (const char *name, const char *type)
{
@@ -732,22 +633,9 @@ sel_registerTypedName (const char *name, const char *type)
return ret;
}
-SEL
-sel_register_typed_name (const char *name, const char *type)
-{
- return sel_registerTypedName (name, type);
-}
-
/* Return the selector representing name. */
SEL
sel_getUid (const char *name)
{
return sel_registerTypedName (name, 0);
}
-
-/* Traditional GNU Objective-C Runtime API. */
-SEL
-sel_get_uid (const char *name)
-{
- return sel_getUid (name);
-}