summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <matthias@benkard.de>2008-07-27 09:57:56 +0200
committerMatthias Andreas Benkard <matthias@benkard.de>2008-07-27 09:57:56 +0200
commit63fbfa1580411f8fc66d1bd6b634b2ae629c9ea8 (patch)
tree06ebc0e50edd13d843efa041ca88484cd0830b08
parent39c6c2eaa800b90d6624306373dd73e88f86c48e (diff)
MLKCons: Implement -copyWithZone:.
This makes the D-B macro work again, though the cause of the failure is still unknown.
-rw-r--r--MLKCons.h2
-rw-r--r--MLKCons.m8
2 files changed, 10 insertions, 0 deletions
diff --git a/MLKCons.h b/MLKCons.h
index 739fb40..55f47c1 100644
--- a/MLKCons.h
+++ b/MLKCons.h
@@ -44,5 +44,7 @@
// only
-(NSString *)descriptionForLisp;
+-(id) copyWithZone:(NSZone *)zone;
+
-(void) dealloc;
@end
diff --git a/MLKCons.m b/MLKCons.m
index 8b3084b..c557dc2 100644
--- a/MLKCons.m
+++ b/MLKCons.m
@@ -128,6 +128,14 @@
return [NSString stringWithFormat:@"(%@)", [self bareDescriptionForLisp]];
}
+-(id) copyWithZone:(NSZone *)zone
+{
+ MLKCons *copy = [MLKCons allocWithZone:zone];
+ ASSIGN (copy->_car, _car);
+ ASSIGN (copy->_cdr, _cdr);
+ return copy;
+}
+
-(void) dealloc
{
RELEASE (_car);