From fbc57ee4882eca6321f8e1f2f5a3b8fae448605b Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Mon, 7 Jun 2010 17:27:54 -0700 Subject: More work on the decoder. --- src/upb_srcsink.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/upb_srcsink.h') diff --git a/src/upb_srcsink.h b/src/upb_srcsink.h index 6a60f31..3a57cc8 100644 --- a/src/upb_srcsink.h +++ b/src/upb_srcsink.h @@ -71,7 +71,7 @@ upb_status *upb_sink_status(upb_sink *sink); /* upb_bytesrc ****************************************************************/ // Returns the next string in the stream. NULL is returned on error or eof. -// The string must be at least "minlen" bytes long. +// The string must be at least "minlen" bytes long unless the stream is eof. // // A ref is passed to the caller, though the caller is encouraged to pass the // ref back to the bytesrc with upb_bytesrc_recycle(). This can help reduce @@ -140,6 +140,7 @@ typedef struct { typedef struct { upb_src_vtable *vtbl; upb_status status; + bool eof; #ifndef NDEBUG int state; // For debug-mode checking of API usage. #endif -- cgit v1.2.3