Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
d58b92ae
Commit
d58b92ae
authored
8 years ago
by
Sergio Campamá
Committed by
Thomas Van Lenten
8 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds pushLimit: and popLimit: into GPBCodedInputStream (#2297)
Adds pushLimit: and popLimit: into GPBCodedInputStream
parent
795976ec
No related merge requests found
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
0 deletions
+29
-0
GPBCodedInputStream.h
objectivec/GPBCodedInputStream.h
+21
-0
GPBCodedInputStream.m
objectivec/GPBCodedInputStream.m
+8
-0
No files found.
objectivec/GPBCodedInputStream.h
View file @
d58b92ae
...
...
@@ -217,6 +217,27 @@ CF_EXTERN_C_END
**/
-
(
size_t
)
position
;
/**
* Moves the limit to the given byte offset starting at the current location.
*
* @exception GPBCodedInputStreamException If the requested bytes exceeed the
* current limit.
*
* @param byteLimit The number of bytes to move the limit, offset to the current
* location.
*
* @return The limit offset before moving the new limit.
*/
-
(
size_t
)
pushLimit
:(
size_t
)
byteLimit
;
/**
* Moves the limit back to the offset as it was before calling pushLimit:.
*
* @param oldLimit The number of bytes to move the current limit. Usually this
* is the value returned by the pushLimit: method.
*/
-
(
void
)
popLimit
:(
size_t
)
oldLimit
;
/**
* Verifies that the last call to -readTag returned the given tag value. This
* is used to verify that a nested group ended with the correct end tag.
...
...
This diff is collapsed.
Click to expand it.
objectivec/GPBCodedInputStream.m
View file @
d58b92ae
...
...
@@ -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_
);
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment