[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Comparing Selectors
From: |
Sašo Kiselkov |
Subject: |
Comparing Selectors |
Date: |
Fri, 05 Aug 2005 11:18:58 +0200 |
User-agent: |
Internet Messaging Program (IMP) 3.2.5 |
I have an issue with comparing selectors. Trouble is, the GNU Objective-C
runtime tells me that SEL's are pointers to struct objc_selector and that they
themselves may not be unique, and the correct way to compare them is by doing:
sel1->sel_id == sel2->sel_id
However, Apple forums and according to what I read about the Apple Objective-C
runtime, doing just
sel1 == sel2
is perfectly fine and that the uniqueness of both selectors is ensured.
So please, can anybody tell me what is the correct, civilized and portable way
of doing it?
Regards
Saso
- Comparing Selectors,
Sašo Kiselkov <=