commit | 331cee502296b382ae42b499e2daab59488f91f8 | [log] [tgz] |
---|---|---|
author | Thomas Van Lenten <thomasvl@google.com> | Fri Apr 01 12:26:15 2016 -0400 |
committer | Thomas Van Lenten <thomasvl@google.com> | Fri Apr 01 12:26:15 2016 -0400 |
tree | 9f098bb05fc577385ed88f4c93078b2f81e823f5 | |
parent | 099ff1ea1400eff8a9f0958f78e44d910dd06e43 [diff] [blame] |
Add -position and -isAtEnd for use when manually parsing input streams.
diff --git a/objectivec/GPBCodedInputStream.m b/objectivec/GPBCodedInputStream.m index fd87783..eaa28e5 100644 --- a/objectivec/GPBCodedInputStream.m +++ b/objectivec/GPBCodedInputStream.m
@@ -359,6 +359,14 @@ } } +- (BOOL)isAtEnd { + return GPBCodedInputStreamIsAtEnd(&state_); +} + +- (size_t)position { + return state_.bufferPos; +} + - (double)readDouble { return GPBCodedInputStreamReadDouble(&state_); }