commit | 57ad051f67b169cd35d6c4375e560a935e131858 | [log] [tgz] |
---|---|---|
author | Christopher Dunn <cdunn2001@gmail.com> | Mon Mar 02 12:10:35 2015 -0600 |
committer | Christopher Dunn <cdunn2001@gmail.com> | Mon Mar 02 23:50:59 2015 -0600 |
tree | 50835d086da98ae21f7ff4b75f69924a2a13db36 | |
parent | b383fdc61e6e93b8df9dad042675c1e152e3669a [diff] [blame] |
allow length in CZString
diff --git a/include/json/value.h b/include/json/value.h index f8fe824..439f05d 100644 --- a/include/json/value.h +++ b/include/json/value.h
@@ -176,8 +176,16 @@ private: void swap(CZString& other); + struct StringStorage { + DuplicationPolicy policy_: 2; + unsigned length_: 30; // 1GB max + }; + const char* cstr_; - ArrayIndex index_; + union { + ArrayIndex index_; + StringStorage storage_; + }; }; public: