Contents (package MULK.OBJECTIVE-CL)
Revert the effect of define-returns-boolean-exception for a given selector.
selector-designator --- a selector designator.
Normally, Objective-C treats method return values that are nominally of type
char as booleans and converts them to either t or nil depending on whether they are zerop. define-returns-boolean-exception directs Objective-CL to treat
char values returned by methods named by selector-designator as numbers instead.
undefine-returns-boolean-exception restores the default behaviour.
(undefine-returns-boolean-exception "boolValue") (undefine-returns-boolean-exception "isEqual:")
The Objective-C runtime offers no way of distinguishing booleans from chars, even though Foundation defines a
BOOL type. In the vast majority of cases,
char therefore actually means
BOOL, but the
NSString class, for one, wouldn't always agree with that sentiment, so the only sane way of handling both booleans and actual
char values is to determine the intentional type by method selector.