mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
Use UTF8String rather than cString
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@40393 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
343ceb58a8
commit
cc27fb0cb5
6 changed files with 92 additions and 92 deletions
|
@ -13,35 +13,35 @@
|
|||
|
||||
/* these macros should only be used in the scope of main */
|
||||
#define TEST_INVOKE(selx) \
|
||||
{ \
|
||||
NS_DURING \
|
||||
NSMethodSignature *sig = nil; \
|
||||
sig = [tar methodSignatureForSelector:selx]; \
|
||||
inv = [NSInvocation invocationWithMethodSignature:sig]; \
|
||||
[inv setSelector:selx]; \
|
||||
[inv invokeWithTarget:tar]; \
|
||||
PASS(1,"Invoke %s",[NSStringFromSelector(selx) cString]); \
|
||||
NS_HANDLER \
|
||||
PASS(0,"Invoke %s",[NSStringFromSelector(selx) cString]); \
|
||||
[localException raise]; \
|
||||
NS_ENDHANDLER \
|
||||
}
|
||||
{ \
|
||||
NS_DURING \
|
||||
NSMethodSignature *sig = nil; \
|
||||
sig = [tar methodSignatureForSelector:selx]; \
|
||||
inv = [NSInvocation invocationWithMethodSignature:sig]; \
|
||||
[inv setSelector:selx]; \
|
||||
[inv invokeWithTarget:tar]; \
|
||||
PASS(1,"Invoke %s",[NSStringFromSelector(selx) UTF8String]); \
|
||||
NS_HANDLER \
|
||||
PASS(0,"Invoke %s",[NSStringFromSelector(selx) UTF8String]); \
|
||||
[localException raise]; \
|
||||
NS_ENDHANDLER \
|
||||
}
|
||||
|
||||
#define TEST_INVOKE_ARG(selx,argp) \
|
||||
{ \
|
||||
NS_DURING \
|
||||
NSMethodSignature *sig = nil; \
|
||||
sig = [tar methodSignatureForSelector:selx]; \
|
||||
inv = [NSInvocation invocationWithMethodSignature:sig]; \
|
||||
[inv setSelector:selx]; \
|
||||
[inv setArgument:argp atIndex:2]; \
|
||||
[inv invokeWithTarget:tar]; \
|
||||
PASS(1,"Invoke %s",[NSStringFromSelector(selx) cString]); \
|
||||
NS_HANDLER \
|
||||
PASS(0,"Invoke %s",[NSStringFromSelector(selx) cString]); \
|
||||
[localException raise]; \
|
||||
NS_ENDHANDLER \
|
||||
}
|
||||
{ \
|
||||
NS_DURING \
|
||||
NSMethodSignature *sig = nil; \
|
||||
sig = [tar methodSignatureForSelector:selx]; \
|
||||
inv = [NSInvocation invocationWithMethodSignature:sig]; \
|
||||
[inv setSelector:selx]; \
|
||||
[inv setArgument:argp atIndex:2]; \
|
||||
[inv invokeWithTarget:tar]; \
|
||||
PASS(1,"Invoke %s",[NSStringFromSelector(selx) UTF8String]); \
|
||||
NS_HANDLER \
|
||||
PASS(0,"Invoke %s",[NSStringFromSelector(selx) UTF8String]); \
|
||||
[localException raise]; \
|
||||
NS_ENDHANDLER \
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue