diff options
author | Thomas Van Lenten <thomasvl@google.com> | 2016-04-01 12:26:15 -0400 |
---|---|---|
committer | Thomas Van Lenten <thomasvl@google.com> | 2016-04-01 12:26:15 -0400 |
commit | 331cee502296b382ae42b499e2daab59488f91f8 (patch) | |
tree | 9f098bb05fc577385ed88f4c93078b2f81e823f5 /objectivec/GPBCodedInputStream.m | |
parent | 099ff1ea1400eff8a9f0958f78e44d910dd06e43 (diff) | |
download | protobuf-331cee502296b382ae42b499e2daab59488f91f8.tar.gz protobuf-331cee502296b382ae42b499e2daab59488f91f8.tar.bz2 protobuf-331cee502296b382ae42b499e2daab59488f91f8.zip |
Add -position and -isAtEnd for use when manually parsing input streams.
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 fd877838..eaa28e50 100644 --- a/objectivec/GPBCodedInputStream.m +++ b/objectivec/GPBCodedInputStream.m @@ -359,6 +359,14 @@ void GPBCodedInputStreamCheckLastTagWas(GPBCodedInputStreamState *state, } } +- (BOOL)isAtEnd { + return GPBCodedInputStreamIsAtEnd(&state_); +} + +- (size_t)position { + return state_.bufferPos; +} + - (double)readDouble { return GPBCodedInputStreamReadDouble(&state_); } |