Commit 8b4d4a9d by Richard Kenner

(sel_get_any_typed_uid): New function.

From-SVN: r10233
parent a43ea319
......@@ -146,6 +146,29 @@ sel_get_typed_uid (const char *name, const char *types)
return 0;
}
/* Return selector representing name; prefer a selector with non-NULL type */
SEL
sel_get_any_typed_uid (const char *name)
{
struct objc_list *l;
sidx i;
SEL s;
i = (sidx) hash_value_for_key (__objc_selector_hash, name);
if (i == 0)
return 0;
for (l = (struct objc_list*)sarray_get (__objc_selector_array, i);
l; l = l->tail)
{
s = (SEL) l->head;
if (s->sel_types)
return s;
}
return s;
}
/* return selector representing name */
SEL
sel_get_any_uid (const char *name)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment