diff options
author | Sergio Campamá <kaipi@google.com> | 2016-10-27 16:06:45 -0400 |
---|---|---|
committer | Thomas Van Lenten <thomasvl@google.com> | 2016-10-27 16:06:45 -0400 |
commit | d58b92ae5169ba888e6b5ca91c0ec9814668fa2c (patch) | |
tree | daa0903528532985238071eb4c18056ec354b04f /objectivec/GPBCodedInputStream.m | |
parent | 795976ecf536957719403b72a449e0b250d1b4e1 (diff) | |
download | protobuf-d58b92ae5169ba888e6b5ca91c0ec9814668fa2c.tar.gz protobuf-d58b92ae5169ba888e6b5ca91c0ec9814668fa2c.tar.bz2 protobuf-d58b92ae5169ba888e6b5ca91c0ec9814668fa2c.zip |
Adds pushLimit: and popLimit: into GPBCodedInputStream (#2297)
Adds pushLimit: and popLimit: into GPBCodedInputStream
Diffstat (limited to 'objectivec/GPBCodedInputStream.m')
-rw-r--r-- | objectivec/GPBCodedInputStream.m | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/objectivec/GPBCodedInputStream.m b/objectivec/GPBCodedInputStream.m index 2b578dd5..e8c8989c 100644 --- a/objectivec/GPBCodedInputStream.m +++ b/objectivec/GPBCodedInputStream.m @@ -400,6 +400,14 @@ void GPBCodedInputStreamCheckLastTagWas(GPBCodedInputStreamState *state, return state_.bufferPos; } +- (size_t)pushLimit:(size_t)byteLimit { + return GPBCodedInputStreamPushLimit(&state_, byteLimit); +} + +- (void)popLimit:(size_t)oldLimit { + GPBCodedInputStreamPopLimit(&state_, oldLimit); +} + - (double)readDouble { return GPBCodedInputStreamReadDouble(&state_); } |