diff options
Diffstat (limited to 'Tests/SwiftMix/ObjCMain.m')
-rw-r--r-- | Tests/SwiftMix/ObjCMain.m | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Tests/SwiftMix/ObjCMain.m b/Tests/SwiftMix/ObjCMain.m index 7fa90ae..5a8700c 100644 --- a/Tests/SwiftMix/ObjCMain.m +++ b/Tests/SwiftMix/ObjCMain.m @@ -1,4 +1,10 @@ #import "SwiftMix-Swift.h" int ObjCMain(int argc, char const* const argv[]) { - return [SwiftMainClass SwiftMain:argc argv:argv]; + if ([SwiftMainClass respondsToSelector:@selector(SwiftMain:argv:)]) { + return [SwiftMainClass SwiftMain:argc argv:argv]; + } + if ([SwiftMainClass respondsToSelector:@selector(SwiftMainWithArgc:argv:)]) { + return [SwiftMainClass SwiftMainWithArgc:argc argv:argv]; + } + return -1; } |