diff options
Diffstat (limited to 'include/hubbub')
-rw-r--r-- | include/hubbub/types.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/hubbub/types.h b/include/hubbub/types.h index 922bdbb..e58a88b 100644 --- a/include/hubbub/types.h +++ b/include/hubbub/types.h @@ -57,7 +57,16 @@ typedef enum hubbub_token_type { * Tokeniser string type */ typedef struct hubbub_string { - uint32_t data_off; /**< Byte offset of string start */ + enum { + HUBBUB_STRING_OFF, + HUBBUB_STRING_PTR + } type; + + union { + const uint8_t *ptr; /**< Pointer to data */ + uint32_t off; /**< Byte offset of string start */ + } data; + size_t len; /**< Byte length of string */ } hubbub_string; |