diff options
Diffstat (limited to 'MLKLexicalContext.m')
-rw-r--r-- | MLKLexicalContext.m | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/MLKLexicalContext.m b/MLKLexicalContext.m index 1ffa726..dd0dc9c 100644 --- a/MLKLexicalContext.m +++ b/MLKLexicalContext.m @@ -436,24 +436,22 @@ static MLKLexicalContext *global_context; } } --(id *) bindingCellForSymbol:(id)name +-(id) bindingForSymbol:(id)name { id prop = [self deepPropertyForVariable:name key:@"LEXCTX.variable-binding"]; if (!prop) { - id *cell = malloc (sizeof(id)); - *cell = [[MLKBinding alloc] init]; - prop = [NSValue valueWithPointer:cell]; - [self setDeepProperty:prop + id binding = [[MLKBinding alloc] init]; + [self setDeepProperty:binding forVariable:name key:@"LEXCTX.variable-binding"]; - return cell; + return binding; } else { - return [prop pointerValue]; + return prop; } } |