Skip to content

Commit

Permalink
Small code reorder to maybe make protocolbuffers#3893 happy.
Browse files Browse the repository at this point in the history
Use the ivar for the -open, so hopefully it lines up with the -close
in dealloc and isn't seen as an unbalanced "open".
  • Loading branch information
thomasvl committed Nov 17, 2017
1 parent 6700f41 commit baed06e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion objectivec/GPBCodedOutputStream.m
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,10 @@ - (instancetype)initWithOutputStream:(NSOutputStream *)output
data:(NSMutableData *)data {
if ((self = [super init])) {
buffer_ = [data retain];
[output open];
state_.bytes = [data mutableBytes];
state_.size = [data length];
state_.output = [output retain];
[state_.output open];
}
return self;
}
Expand Down

0 comments on commit baed06e

Please sign in to comment.