aboutsummaryrefslogtreecommitdiffhomepage
path: root/objectivec/GPBCodedInputStream.m
diff options
context:
space:
mode:
authorGravatar Thomas Van Lenten <thomasvl@google.com>2016-04-01 12:26:15 -0400
committerGravatar Thomas Van Lenten <thomasvl@google.com>2016-04-01 12:26:15 -0400
commit331cee502296b382ae42b499e2daab59488f91f8 (patch)
tree9f098bb05fc577385ed88f4c93078b2f81e823f5 /objectivec/GPBCodedInputStream.m
parent099ff1ea1400eff8a9f0958f78e44d910dd06e43 (diff)
Add -position and -isAtEnd for use when manually parsing input streams.
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 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_);
}