Permalink
Browse files

Avoid a stack operation when we already have the member handy

  • Loading branch information...
1 parent 2318ee0 commit 57bb65b59f067ffebb5c511f3161944f42fd6d3f @stig committed Dec 21, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 Classes/SBJsonStreamParserAdapter.m
@@ -128,7 +128,7 @@ - (void)parser:(SBJsonStreamParser*)parser foundObjectKey:(NSString*)key_ {
- (void)parserFoundObjectEnd:(SBJsonStreamParser*)parser {
if (depth-- > skip) {
- id value = [[stack lastObject] retain];
+ id value = [dict retain];
[self pop];
[self parser:parser found:value];
[value release];
@@ -145,7 +145,7 @@ - (void)parserFoundArrayStart:(SBJsonStreamParser*)parser {
- (void)parserFoundArrayEnd:(SBJsonStreamParser*)parser {
if (depth-- > skip) {
- id value = [[stack lastObject] retain];
+ id value = [array retain];
[self pop];
[self parser:parser found:value];
[value release];

0 comments on commit 57bb65b

Please sign in to comment.