summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MLKCons.m4
1 files changed, 2 insertions, 2 deletions
diff --git a/MLKCons.m b/MLKCons.m
index bee917f..9e49d45 100644
--- a/MLKCons.m
+++ b/MLKCons.m
@@ -146,7 +146,7 @@
if (!_cdr)
return [NSString stringWithFormat:@"%@",
MLKPrintToString(_car)];
- else if ([_cdr isKindOfClass:[MLKCons class]])
+ else if (MLKInstanceP (_cdr) && [_cdr isKindOfClass:[MLKCons class]])
return [NSString stringWithFormat:@"%@ %@",
MLKPrintToString(_car),
[_cdr bareDescriptionForLisp]];
@@ -158,7 +158,7 @@
-(NSString *)descriptionForLisp
{
- if ([_cdr isKindOfClass:[MLKCons class]])
+ if (MLKInstanceP (_cdr) && [_cdr isKindOfClass:[MLKCons class]])
{
if (_car == [[MLKPackage findPackage:@"COMMON-LISP"] intern:@"QUOTE"])
return [NSString stringWithFormat:@"'%@", [_cdr bareDescriptionForLisp]];