diff options
author | Matthias Andreas Benkard <matthias@benkard.de> | 2008-07-26 14:48:12 +0200 |
---|---|---|
committer | Matthias Andreas Benkard <matthias@benkard.de> | 2008-07-26 14:48:12 +0200 |
commit | ac3c67818eaaf7e72e039bff93e4226f086b07e8 (patch) | |
tree | 30b841813d68d61c5ec58d9b5e7f334194ac6922 | |
parent | 063a52c437f579bccc49d93dba1804f13104ec6c (diff) |
Add OBJC-CLASS-OF, OBJC-SUBCLASSP, FIND-OBJC-CLASS, and NS-LOG.
-rw-r--r-- | MLKPackage.m | 4 | ||||
-rw-r--r-- | MLKRoot.m | 23 |
2 files changed, 27 insertions, 0 deletions
diff --git a/MLKPackage.m b/MLKPackage.m index cae3416..039596a 100644 --- a/MLKPackage.m +++ b/MLKPackage.m @@ -115,6 +115,10 @@ static NSMutableDictionary *packages = nil; [sys export:[sys intern:@"MAKE-SYMBOL"]]; [sys export:[sys intern:@"IMPORT"]]; [sys export:[sys intern:@"INTERN"]]; + [sys export:[sys intern:@"OBJC-CLASS-OF"]]; + [sys export:[sys intern:@"OBJC-SUBCLASSP"]]; + [sys export:[sys intern:@"FIND-OBJC-CLASS"]]; + [sys export:[sys intern:@"NS-LOG"]]; [cl export:[cl intern:@"*BREAK-ON-SIGNALS*"]]; [cl export:[cl intern:@"*COMPILE-FILE-PATHNAME*"]]; @@ -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 |