Re-add -autorelease to the Object protocol.

This commit is contained in:
Jeff Teunissen 2003-07-29 18:23:44 +00:00
parent 7713a539ca
commit d05f17cdae
2 changed files with 4 additions and 4 deletions

View file

@ -85,9 +85,7 @@ typedef enum {
- (BOOL) conformsToProtocol: (Protocol)aProtocol; - (BOOL) conformsToProtocol: (Protocol)aProtocol;
- (id) retain; - (id) retain;
#if 0
- (id) autorelease; - (id) autorelease;
#endif // autorelease pools
- (/*oneway*/ void) release; - (/*oneway*/ void) release;
- (/*unsigned*/integer) retainCount; - (/*unsigned*/integer) retainCount;
@end @end

View file

@ -42,7 +42,9 @@
- (void) addObject: (id)anObject - (void) addObject: (id)anObject
{ {
top = [[[ListNode alloc] initWithObject: anObject] setNextNode: top]; local id oldTop = top;
top = [[ListNode alloc] initWithObject: anObject];
[top setNextNode: oldTop];
stackSize++; stackSize++;
} }
@ -55,7 +57,7 @@
return NIL; return NIL;
oldTop = top; oldTop = top;
top = [top next]; top = [top nextNode];
stackSize--; stackSize--;
data = [[oldTop object] retain]; data = [[oldTop object] retain];