summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <matthias@benkard.de>2008-08-24 20:14:57 +0200
committerMatthias Andreas Benkard <matthias@benkard.de>2008-08-24 20:14:57 +0200
commite75b253c050a5a0658dfab72cb0783f1f4a09b81 (patch)
tree7f151bb58508ad1bafad6298614301e3332b20e1
parent429f745586810181764399a971615b2f74af48cc (diff)
Interpreter: Fix a couple of really stupid bugs.
-rw-r--r--MLKInterpreter.m9
1 files changed, 5 insertions, 4 deletions
diff --git a/MLKInterpreter.m b/MLKInterpreter.m
index f85bf21..de493fb 100644
--- a/MLKInterpreter.m
+++ b/MLKInterpreter.m
@@ -45,6 +45,7 @@
#import <Foundation/NSException.h>
#import <Foundation/NSNull.h>
#import <Foundation/NSString.h>
+#import <Foundation/NSValue.h>
#include <stdio.h>
@@ -256,9 +257,6 @@
values = [self interpretBodyWithEnvironment:env];
- [MLKDynamicContext popContext];
- LRELEASE (newctx);
-
NS_VALUERETURN (values, NSArray *);
}
NS_HANDLER
@@ -282,6 +280,9 @@
}
NS_ENDHANDLER;
+ [MLKDynamicContext popContext];
+ LRELEASE (newctx);
+
return nil;
}
@end
@@ -304,7 +305,7 @@
NSMutableArray *argtypes = [NSMutableArray array];
int i;
- for (i = 0; i++; i < _argc)
+ for (i = 0; i < _argc; i++)
[argtypes addObject:[NSNumber numberWithInt:_argumentTypes[i]]];
RETURN_VALUE (LAUTORELEASE ([[MLKForeignProcedure alloc]