summaryrefslogtreecommitdiff
path: root/upb/bytestream.h
diff options
context:
space:
mode:
authorJoshua Haberman <joshua@reverberate.org>2011-08-12 15:32:53 -0700
committerJoshua Haberman <joshua@reverberate.org>2011-08-12 15:32:53 -0700
commit51d4e295a4d8e55facf0e95502cde75d488fd511 (patch)
tree7fcbe39a56a15afdddbf10e41ca978d0b50e23d1 /upb/bytestream.h
parentfe3df2c9bc66ffe5dbc4c9410052be1bc2d7d443 (diff)
Python: fleshed out accessors.
Diffstat (limited to 'upb/bytestream.h')
-rw-r--r--upb/bytestream.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/upb/bytestream.h b/upb/bytestream.h
index 9b6f5cb..cff177b 100644
--- a/upb/bytestream.h
+++ b/upb/bytestream.h
@@ -138,6 +138,10 @@ typedef struct _upb_strref {
// string.
char *upb_strref_dup(struct _upb_strref *r);
+INLINE void upb_strref_read(struct _upb_strref *r, char *buf) {
+ upb_bytesrc_read(r->bytesrc, r->stream_offset, r->len, buf);
+}
+
/* upb_bytesink ***************************************************************/
@@ -278,7 +282,7 @@ void upb_stringsink_reset(upb_stringsink *s, char *str, size_t size);
const char *upb_stringsink_release(upb_stringsink *s, size_t *len);
// Returns the upb_bytesink* for this stringsrc. Invalidated by reset above.
-upb_bytesink *upb_stringsink_bytesink(void);
+upb_bytesink *upb_stringsink_bytesink(upb_stringsink *s);
#ifdef __cplusplus
} /* extern "C" */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback