From ab6010f8463ec21ed50de38ffad29e8fb6ba4867 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Sun, 27 Jul 2008 18:52:23 +0200 Subject: Add SYMBOL-NAME. --- MLKPackage.m | 1 + MLKRoot.m | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/MLKPackage.m b/MLKPackage.m index 9ed5839..3d94d69 100644 --- a/MLKPackage.m +++ b/MLKPackage.m @@ -122,6 +122,7 @@ static NSMutableDictionary *packages = nil; [sys export:[sys intern:@"OBJC-SUBCLASSP"]]; [sys export:[sys intern:@"FIND-OBJC-CLASS"]]; [sys export:[sys intern:@"NS-LOG"]]; + [sys export:[sys intern:@"SYMBOL-NAME"]]; [cl export:[cl intern:@"*BREAK-ON-SIGNALS*"]]; [cl export:[cl intern:@"*COMPILE-FILE-PATHNAME*"]]; diff --git a/MLKRoot.m b/MLKRoot.m index a921c19..07cfe5f 100644 --- a/MLKRoot.m +++ b/MLKRoot.m @@ -406,7 +406,7 @@ static id truify (BOOL value) intern:@"*PACKAGE*"]])); MLKSymbol *symbol = [package intern:name]; - return [NSArray arrayWithObjects:symbol, nil]; + RETURN_VALUE (symbol); } +(NSArray *) import:(NSArray *)args @@ -446,4 +446,10 @@ static id truify (BOOL value) NSLog (@"%@", description); RETURN_VALUE ([args objectAtIndex:0]); } + ++(NSArray *) symbol_name:(NSArray *)args +{ + MLKSymbol *symbol = denullify ([args objectAtIndex:0]); + RETURN_VALUE (symbol ? (id)[symbol name] : (id)@"NIL"); +} @end -- cgit v1.2.3