diff options
author | Matthias Andreas Benkard <matthias@benkard.de> | 2008-08-04 16:20:18 +0200 |
---|---|---|
committer | Matthias Andreas Benkard <matthias@benkard.de> | 2008-08-04 16:20:18 +0200 |
commit | a4c9f5bd436dae1d99845f50da55bae733129f56 (patch) | |
tree | 22a1718222ab8d76f928cfaa4740442a4d43c1fd /MLKLinkedList.m | |
parent | a0b4d1eafa4312b5970f7268441d848be5231e7b (diff) |
Add fixnum-aware macros LRETAIN, LRELEASE, LDESTROY, LAUTORELEASE, LASSIGN_COPY, and LASSIGN.
Diffstat (limited to 'MLKLinkedList.m')
-rw-r--r-- | MLKLinkedList.m | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/MLKLinkedList.m b/MLKLinkedList.m index 73b6d7d..3dfd5eb 100644 --- a/MLKLinkedList.m +++ b/MLKLinkedList.m @@ -19,6 +19,7 @@ #import "MLKLinkedList.h" #import "MLKCons.h" #import "runtime-compatibility.h" +#import "util.h" @implementation MLKLinkedList @@ -32,21 +33,21 @@ -(MLKLinkedList*) initWithCons:(MLKCons*)cons { self = [super init]; - ASSIGN (_firstCons, cons); + LASSIGN (_firstCons, cons); return self; } -(void) push: (id)object { - ASSIGN (_firstCons, [MLKCons cons:object with:_firstCons]); + LASSIGN (_firstCons, [MLKCons cons:object with:_firstCons]); } -(id) pop { id retval = [_firstCons car]; - RETAIN (retval); - ASSIGN (_firstCons, [_firstCons cdr]); - AUTORELEASE (retval); + LRETAIN (retval); + LASSIGN (_firstCons, [_firstCons cdr]); + LAUTORELEASE (retval); return retval; } @@ -82,7 +83,7 @@ -(void) dealloc { - RELEASE (_firstCons); + LRELEASE (_firstCons); [super dealloc]; } @end |