I've found that the SEL
type has the next definition:
typedef struct objc_selector *SEL;
But I can't find how is objc_selector
implemented.
Okay, if we have the next code
#import <Foundation/Foundation.h>
int main(int argc, const char * argv[]) {
SEL mySelector = NSSelectorFromString(@"mySelector");
return 0;
}
, then mySelector
is just a pointer. Following the address which it contains, we see the C-string, which can be presented like:
const char* mySelector = "mySelector";
But objc_selector
is not a C-string, it is structure and it can contain something else. So I want to know how objc_selector
structure is implemented.