diff options
author | Matthias Andreas Benkard <matthias@benkard.de> | 2008-06-14 16:31:50 +0200 |
---|---|---|
committer | Matthias Andreas Benkard <matthias@benkard.de> | 2008-06-14 16:31:50 +0200 |
commit | 3e30453f1714b03be1a6588e174a3f256e80cf5f (patch) | |
tree | 366849bb306e10f7a70eac65855cca2bb9b53626 | |
parent | 206e9d65a486e7f01e9fe32b2ef66bc4b0c22798 (diff) |
Call [super init] from every initialiser of every class.
-rw-r--r-- | MLKCons.m | 1 | ||||
-rw-r--r-- | MLKDynamicContext.m | 1 | ||||
-rw-r--r-- | MLKEnvironment.m | 1 | ||||
-rw-r--r-- | MLKLinkedList.m | 2 | ||||
-rw-r--r-- | MLKLowLevelTests.m | 3 | ||||
-rw-r--r-- | MLKSymbol.m | 1 | ||||
-rw-r--r-- | MLKThrowException.m | 1 | ||||
-rw-r--r-- | MLKUndefinedVariableException.m | 1 |
8 files changed, 10 insertions, 1 deletions
@@ -12,6 +12,7 @@ -(MLKCons*) initWithCar:(id)car cdr:(id)cdr { + self = [super init]; ASSIGN (_car, car); ASSIGN (_cdr, cdr); return self; diff --git a/MLKDynamicContext.m b/MLKDynamicContext.m index 7be5748..bca4521 100644 --- a/MLKDynamicContext.m +++ b/MLKDynamicContext.m @@ -28,6 +28,7 @@ catchTags:(NSDictionary *)catchTags currentHandler:(MLKClosure *)handler { + self = [super init]; ASSIGN (_parent, (aContext ? aContext : [MLKDynamicContext currentContext])); _environment = MAKE_ENVIRONMENT(vars, _parent, _parent->_environment); _conditionHandlers = MAKE_ENVIRONMENT(handlers, diff --git a/MLKEnvironment.m b/MLKEnvironment.m index 0da3a14..6bc83f9 100644 --- a/MLKEnvironment.m +++ b/MLKEnvironment.m @@ -16,6 +16,7 @@ -(MLKEnvironment *) initWithParent:(MLKEnvironment *)parent bindings:(NSDictionary *)bindings { + self = [super init]; _bindings = [[NSMutableDictionary alloc] initWithCapacity:10]; ASSIGN (_parent, parent); [self addBindings: bindings]; diff --git a/MLKLinkedList.m b/MLKLinkedList.m index 3f047a0..b5c1c66 100644 --- a/MLKLinkedList.m +++ b/MLKLinkedList.m @@ -8,12 +8,14 @@ @implementation MLKLinkedList -(MLKLinkedList*) init { + self = [super init]; _firstCons = nil; return self; } -(MLKLinkedList*) initWithCons:(MLKCons*)cons { + self = [super init]; ASSIGN (_firstCons, cons); return self; } diff --git a/MLKLowLevelTests.m b/MLKLowLevelTests.m index c47fd2a..2b053a9 100644 --- a/MLKLowLevelTests.m +++ b/MLKLowLevelTests.m @@ -1,4 +1,4 @@ -/* Étoilisp, a Common Lisp subset for Étoilé. +/* Étoilisp/Mulklisp, a Common Lisp subset for the Étoilé runtime. * Copyright (C) 2008 Matthias Andreas Benkard. * * This program is free software: you can redistribute it and/or modify @@ -31,6 +31,7 @@ @implementation MLKLowLevelTests -(id) initForTest { + self = [super init]; return self; } diff --git a/MLKSymbol.m b/MLKSymbol.m index 6ef0411..724cdfd 100644 --- a/MLKSymbol.m +++ b/MLKSymbol.m @@ -7,6 +7,7 @@ @implementation MLKSymbol -(MLKSymbol *) initWithName:(id)aName package:(id)aPackage { + self = [super init]; ASSIGN (name, aName); ASSIGN (homePackage, aPackage); return self; diff --git a/MLKThrowException.m b/MLKThrowException.m index e3f3e0c..a4ba9ae 100644 --- a/MLKThrowException.m +++ b/MLKThrowException.m @@ -8,6 +8,7 @@ -(MLKThrowException *) initWithCatchTag:(MLKSymbol *)catchTag value:(id)value { + self = [super init]; ASSIGN (_catchTag, catchTag); ASSIGN (_value, value); return self; diff --git a/MLKUndefinedVariableException.m b/MLKUndefinedVariableException.m index 5795b55..a824188 100644 --- a/MLKUndefinedVariableException.m +++ b/MLKUndefinedVariableException.m @@ -8,6 +8,7 @@ -(MLKUndefinedVariableException *) initWithEnvironment:(id)anEnvironment variableName:(id)aSymbol { + self = [super init]; variableName = aSymbol; environment = anEnvironment; return self; |