Skip to content

Commit

Permalink
Add args handling
Browse files Browse the repository at this point in the history
  • Loading branch information
sttts committed Mar 6, 2015
1 parent 6edbafe commit 6b4f4c4
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions iphone/Classes/ComStttsExitModule.m
Expand Up @@ -86,9 +86,15 @@ -(void)_listenerRemoved:(NSString *)type count:(int)count

#pragma Public APIs

-(id)exit:(id)args
-(id)exit:(NSArray*)args
{
exit(0);
if (args == nil || [args count] == 0) {
exit(0);
} else {
NSInteger *rc = [TiUtils intValue:[args objectAtIndex:0]];
exit(*rc);
}
return nil;
}

@end

0 comments on commit 6b4f4c4

Please sign in to comment.