From 56984e8db8e1c43687535cc77fb6ce43df0b3d1f Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Fri, 29 Jul 2011 17:49:59 -0700 Subject: Significant work on Lua extension. Also changes in core library to accommodate. --- upb/bytestream.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'upb/bytestream.h') diff --git a/upb/bytestream.h b/upb/bytestream.h index 2a6f7d2..6090d6a 100644 --- a/upb/bytestream.h +++ b/upb/bytestream.h @@ -119,16 +119,17 @@ typedef struct _upb_strref { // the actual pointers). const char *ptr; - // Bytesrc from which this string data comes. This is only guaranteed to be - // alive from inside the callback; however if the handler knows more about - // its type and how to prolong its life, it may do so. - upb_bytesrc *bytesrc; + // Length of the string. + uint32_t len; // Offset in the bytesrc that represents the beginning of this string. uint32_t stream_offset; - // Length of the string. - uint32_t len; + // Bytesrc from which this string data comes. May be NULL if ptr is set. If + // non-NULL, the bytesrc is only guaranteed to be alive from inside the + // callback; however if the handler knows more about its type and how to + // prolong its life, it may do so. + upb_bytesrc *bytesrc; // Possibly add optional members here like start_line, start_column, etc. } upb_strref; -- cgit v1.2.3