summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <matthias@benkard.de>2008-07-27 18:52:23 +0200
committerMatthias Andreas Benkard <matthias@benkard.de>2008-07-27 18:52:23 +0200
commitab6010f8463ec21ed50de38ffad29e8fb6ba4867 (patch)
treeb5e00f06d2f6defd21c3a02384416cb2e685ead4
parent0d52c58f1e8941c4c08182710abcb327489b8c99 (diff)
Add SYMBOL-NAME.
-rw-r--r--MLKPackage.m1
-rw-r--r--MLKRoot.m8
2 files changed, 8 insertions, 1 deletions
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