summaryrefslogtreecommitdiff
path: root/MLKSymbol.m
diff options
context:
space:
mode:
Diffstat (limited to 'MLKSymbol.m')
-rw-r--r--MLKSymbol.m26
1 files changed, 26 insertions, 0 deletions
diff --git a/MLKSymbol.m b/MLKSymbol.m
index 1cab004..73d418a 100644
--- a/MLKSymbol.m
+++ b/MLKSymbol.m
@@ -27,9 +27,19 @@
self = [super init];
ASSIGN (name, aName);
ASSIGN (homePackage, aPackage);
+ real_identity = nil;
return self;
}
+-(id) copyWithZone:(NSZone *)zone
+{
+ MLKSymbol *copy = [MLKSymbol allocWithZone:zone];
+ ASSIGN (copy->name, name);
+ ASSIGN (copy->homePackage, homePackage);
+ ASSIGN (copy->real_identity, self);
+ return copy;
+}
+
-(NSString *) name
{
return name;
@@ -53,6 +63,22 @@
return [NSString stringWithFormat:@"|%@|", name];
}
+-(BOOL) isEqual:(id)object
+{
+ if (object == self)
+ return YES;
+
+ if (!([object isKindOfClass:[MLKSymbol class]]))
+ return NO;
+
+ return ((((MLKSymbol *)object)->real_identity
+ ? ((MLKSymbol *)object)->real_identity
+ : (MLKSymbol *)object)
+ == ((self->real_identity != nil
+ ? self->real_identity
+ : self)));
+}
+
-(void) dealloc
{
RELEASE (name);