Re: SELs in arrays
Re: SELs in arrays
- Subject: Re: SELs in arrays
- From: John Hörnkvist <email@hidden>
- Date: Tue, 25 Sep 2001 22:04:44 +0200
On Tuesday, September 25, 2001, at 09:13 PM, Ondra Cada wrote:
(*) I regret to say I even don't fully understand the mechanism which is
used to unique selectors during dynamic loading. Well, it does work,
that's
important ;)))
IIRC, a global table of struct objc_selectors is used. Each SEL is a
pointer into that table.
This approach makes it easy to check if something is a selector; it can
only be a selector if it's a pointer into the selector table.
When you need to get a SEL from an objc_selector, such as during dynamic
loading, you iterate over the selector table and return the first match,
or put the structure at the end of the selector table, increasing the
table size by one.
Regards,
John Hornkvist
--
ToastedMarshmallow, the perfect Cocoa companion
http://www.toastedmarshmallow.com