From a4c9f5bd436dae1d99845f50da55bae733129f56 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Mon, 4 Aug 2008 16:20:18 +0200 Subject: Add fixnum-aware macros LRETAIN, LRELEASE, LDESTROY, LAUTORELEASE, LASSIGN_COPY, and LASSIGN. --- MLKLinkedList.m | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'MLKLinkedList.m') 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 -- cgit v1.2.3