From 3affb319260263efc3cee502896d9f981186c7da Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Sat, 5 Feb 2011 18:53:32 -0800 Subject: Tons of work: we're close to passing test_vs_proto2 again. --- stream/upb_strstream.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'stream/upb_strstream.h') diff --git a/stream/upb_strstream.h b/stream/upb_strstream.h index d01d21f..1a8792b 100644 --- a/stream/upb_strstream.h +++ b/stream/upb_strstream.h @@ -18,12 +18,16 @@ extern "C" { /* upb_stringsrc **************************************************************/ -struct upb_stringsrc; -typedef struct upb_stringsrc upb_stringsrc; +struct _upb_stringsrc { + upb_bytesrc bytesrc; + upb_string *str; + upb_strlen_t offset; +}; +typedef struct _upb_stringsrc upb_stringsrc; // Create/free a stringsrc. -upb_stringsrc *upb_stringsrc_new(); -void upb_stringsrc_free(upb_stringsrc *s); +void upb_stringsrc_init(upb_stringsrc *s); +void upb_stringsrc_uninit(upb_stringsrc *s); // Resets the stringsrc to a state where it will vend the given string. The // stringsrc will take a reference on the string, so the caller need not ensure -- cgit v1.2.3