From c918ca4ed93121a1fa3fcbf98502f61e9055d340 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Wed, 18 Jun 2008 15:56:59 +0200 Subject: MLKEnvironment: Store [NSNull null] instead of nil. --- MLKEnvironment.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MLKEnvironment.m b/MLKEnvironment.m index 8488dd2..b2a3a81 100644 --- a/MLKEnvironment.m +++ b/MLKEnvironment.m @@ -69,6 +69,7 @@ static id UNBOUND; -(void) setBinding:(MLKSymbol *)symbol to:(id)value inEnvironment:(MLKEnvironment *)env { + value = value ? value : (id) [NSNull null]; if ([_bindings objectForKey:symbol]) [_bindings setObject:value forKey:symbol]; else @@ -117,6 +118,7 @@ static id UNBOUND; -(void) addValue:(id)value forBinding:(MLKSymbol *)symbol; { + value = value ? value : (id) [NSNull null]; [_bindings setObject:value forKey:symbol]; } -- cgit v1.2.3