aboutsummaryrefslogtreecommitdiff
path: root/objectivec/GPBCodedInputStream.m
diff options
context:
space:
mode:
authorSergio Campamá <kaipi@google.com>2016-10-27 16:06:45 -0400
committerThomas Van Lenten <thomasvl@google.com>2016-10-27 16:06:45 -0400
commitd58b92ae5169ba888e6b5ca91c0ec9814668fa2c (patch)
treedaa0903528532985238071eb4c18056ec354b04f /objectivec/GPBCodedInputStream.m
parent795976ecf536957719403b72a449e0b250d1b4e1 (diff)
downloadprotobuf-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.m8
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_);
}