mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Added new arguments to the macros. These macros don't require SEL type
argument to specify the method to invoke now. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@2842 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
0cd2b7042f
commit
63435c6c96
1 changed files with 17 additions and 16 deletions
|
@ -53,28 +53,29 @@
|
|||
|
||||
@end
|
||||
|
||||
/* The second argument of the following macros must
|
||||
be SEL type.
|
||||
-initWithTarget:selector:, a method used in the macros
|
||||
is come from the MethodInvocation behavior.
|
||||
So your gcc warns that NSInvocation doesn't have
|
||||
/* -initWithTarget:selector:, a method used in the macros
|
||||
is come from the MethodInvocation behavior.
|
||||
So your gcc warns that NSInvocation doesn't have
|
||||
-initWithTarget:selector:.
|
||||
|
||||
e.g.
|
||||
NS_INVOCATION([NSObject class] ,
|
||||
@selector(isKindOfClass:),
|
||||
[NSObject class]);
|
||||
NS_MESSAGE([NSObject new] ,
|
||||
@selector(isKindOfClass:), [NSObject class]); */
|
||||
|
||||
#define NS_INVOCATION(ACLASS, INSTANCEMESSAGE...)\
|
||||
e.g.
|
||||
NS_INVOCATION([NSObject class] ,
|
||||
isKindOfClass:,
|
||||
[NSObject class]);
|
||||
|
||||
NS_MESSAGE([NSObject new] ,
|
||||
isKindOfClass:, [NSObject class]);
|
||||
|
||||
NS_MESSAGE([NSObject new] , hash) */
|
||||
|
||||
#define NS_INVOCATION(ACLASS, SELECTOR, ARGS...)\
|
||||
([[[NSInvocation alloc]\
|
||||
initWithTarget:nil selector: INSTANCEMESSAGE]\
|
||||
initWithTarget:nil selector: (@selector(SELECTOR)) , ## ARGS]\
|
||||
autorelease])
|
||||
|
||||
#define NS_MESSAGE(ANOBJECT, INSTANCEMESSAGE...)\
|
||||
#define NS_MESSAGE(ANOBJECT, SELECTOR, ARGS...)\
|
||||
([[[NSInvocation alloc]\
|
||||
initWithTarget:(ANOBJECT) selector: INSTANCEMESSAGE]\
|
||||
initWithTarget:(ANOBJECT) selector: (@selector(SELECTOR)) , ## ARGS]\
|
||||
autorelease])
|
||||
|
||||
#endif /* __NSInvocation_h_GNUSTEP_BASE_INCLUDE */
|
||||
|
|
Loading…
Reference in a new issue