summaryrefslogtreecommitdiff
path: root/MLKRoot.m
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <matthias@benkard.de>2008-07-26 14:48:12 +0200
committerMatthias Andreas Benkard <matthias@benkard.de>2008-07-26 14:48:12 +0200
commitac3c67818eaaf7e72e039bff93e4226f086b07e8 (patch)
tree30b841813d68d61c5ec58d9b5e7f334194ac6922 /MLKRoot.m
parent063a52c437f579bccc49d93dba1804f13104ec6c (diff)
Add OBJC-CLASS-OF, OBJC-SUBCLASSP, FIND-OBJC-CLASS, and NS-LOG.
Diffstat (limited to 'MLKRoot.m')
-rw-r--r--MLKRoot.m23
1 files changed, 23 insertions, 0 deletions
diff --git a/MLKRoot.m b/MLKRoot.m
index f6ee730..dc2560d 100644
--- a/MLKRoot.m
+++ b/MLKRoot.m
@@ -409,4 +409,27 @@ static id truify (BOOL value)
RETURN_VALUE ([cl intern:@"T"]);
}
+
++(NSArray *) objc_class_of:(NSArray *)args
+{
+ RETURN_VALUE ([[args objectAtIndex:0] class]);
+}
+
++(NSArray *) objc_subclassp:(NSArray *)args
+{
+ RETURN_VALUE (truify ([[args objectAtIndex:0] isSubclassOfClass:
+ [args objectAtIndex:1]]));
+}
+
++(NSArray *) find_objc_class:(NSArray *)args
+{
+ RETURN_VALUE (NSClassFromString ([args objectAtIndex:0]));
+}
+
++(NSArray *) ns_log:(NSArray *)args
+{
+ NSString *description = [[args objectAtIndex:0] descriptionForLisp];
+ NSLog (@"%@", description);
+ RETURN_VALUE ([args objectAtIndex:0]);
+}
@end