diff options
author | Matthias Andreas Benkard <matthias@benkard.de> | 2008-08-04 16:20:18 +0200 |
---|---|---|
committer | Matthias Andreas Benkard <matthias@benkard.de> | 2008-08-04 16:20:18 +0200 |
commit | a4c9f5bd436dae1d99845f50da55bae733129f56 (patch) | |
tree | 22a1718222ab8d76f928cfaa4740442a4d43c1fd /MLKLexicalEnvironment.m | |
parent | a0b4d1eafa4312b5970f7268441d848be5231e7b (diff) |
Add fixnum-aware macros LRETAIN, LRELEASE, LDESTROY, LAUTORELEASE, LASSIGN_COPY, and LASSIGN.
Diffstat (limited to 'MLKLexicalEnvironment.m')
-rw-r--r-- | MLKLexicalEnvironment.m | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/MLKLexicalEnvironment.m b/MLKLexicalEnvironment.m index 4bcac78..eb84ada 100644 --- a/MLKLexicalEnvironment.m +++ b/MLKLexicalEnvironment.m @@ -35,6 +35,7 @@ #import "MLKInteger.h" #import "MLKValuesFunction.h" #import "runtime-compatibility.h" +#import "util.h" #define MAKE_ENVIRONMENT(variable, parent, parent_member) \ @@ -60,7 +61,7 @@ static MLKLexicalEnvironment *global_environment; [vars setObject:[NSNull null] forKey:[NSNull null]]; [vars setObject:[cl intern:@"T"] forKey:[cl intern:@"T"]]; - [funs setObject:AUTORELEASE ([[MLKValuesFunction alloc] init]) + [funs setObject:LAUTORELEASE ([[MLKValuesFunction alloc] init]) forKey:[cl intern:@"VALUES"]]; global_environment = [[self alloc] initWithParent:nil @@ -73,7 +74,7 @@ static MLKLexicalEnvironment *global_environment; functions:(NSDictionary *)functions { self = [super init]; - ASSIGN (_parent, (aContext ? aContext : global_environment)); + LASSIGN (_parent, (aContext ? aContext : global_environment)); _variables = MAKE_ENVIRONMENT(vars, _parent, _parent->_variables); _functions = MAKE_ENVIRONMENT(functions, _parent, _parent->_functions); return self; @@ -83,7 +84,7 @@ static MLKLexicalEnvironment *global_environment; variables:(NSDictionary *)vars functions:(NSDictionary *)functions { - return AUTORELEASE ([[self alloc] initWithParent:context + return LAUTORELEASE ([[self alloc] initWithParent:context variables:vars functions:functions]); } @@ -160,9 +161,9 @@ static MLKLexicalEnvironment *global_environment; -(void) dealloc { - RELEASE (_variables); - RELEASE (_functions); - RELEASE (_parent); + LRELEASE (_variables); + LRELEASE (_functions); + LRELEASE (_parent); [super dealloc]; } @end |