File tree 2 files changed +29
-0
lines changed
2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -217,6 +217,27 @@ CF_EXTERN_C_END
217
217
**/
218
218
- (size_t )position ;
219
219
220
+ /* *
221
+ * Moves the limit to the given byte offset starting at the current location.
222
+ *
223
+ * @exception GPBCodedInputStreamException If the requested bytes exceeed the
224
+ * current limit.
225
+ *
226
+ * @param byteLimit The number of bytes to move the limit, offset to the current
227
+ * location.
228
+ *
229
+ * @return The limit offset before moving the new limit.
230
+ */
231
+ - (size_t )pushLimit : (size_t )byteLimit ;
232
+
233
+ /* *
234
+ * Moves the limit back to the offset as it was before calling pushLimit:.
235
+ *
236
+ * @param oldLimit The number of bytes to move the current limit. Usually this
237
+ * is the value returned by the pushLimit: method.
238
+ */
239
+ - (void )popLimit : (size_t )oldLimit ;
240
+
220
241
/* *
221
242
* Verifies that the last call to -readTag returned the given tag value. This
222
243
* is used to verify that a nested group ended with the correct end tag.
Original file line number Diff line number Diff line change @@ -400,6 +400,14 @@ - (size_t)position {
400
400
return state_.bufferPos ;
401
401
}
402
402
403
+ - (size_t )pushLimit : (size_t )byteLimit {
404
+ return GPBCodedInputStreamPushLimit (&state_, byteLimit);
405
+ }
406
+
407
+ - (void )popLimit : (size_t )oldLimit {
408
+ GPBCodedInputStreamPopLimit (&state_, oldLimit);
409
+ }
410
+
403
411
- (double )readDouble {
404
412
return GPBCodedInputStreamReadDouble (&state_);
405
413
}
You can’t perform that action at this time.
0 commit comments