Thad House
8fc2eee2b4
Makes Value::MakeStringArray properly set size
...
The Value::MakeStringArray methods were not setting the size of the
arr_string. This was causing the NT_Value struct called from the C
entry listener callback to not have the array size, which would then
cause the GetValueStringArray method to fail the malloc.
2015-11-09 22:05:38 -08:00
Peter Johnson
29f73cb5c1
Don't dispose in ConvertToC for NT_String and NT_Value.
...
Fixes #16 .
2015-08-22 19:31:53 -07:00
Peter Johnson
854bfba7c9
Value: Set last_change field.
2015-07-17 11:16:03 -07:00
Peter Johnson
fcbd2751ba
Provide C++ API. Move all classes to "nt" namespace.
...
The C API is now just simple wrappers around the C++ API.
2015-07-17 07:21:07 -07:00
Peter Johnson
2ea20b8e81
Value: Use NT_Value for internal storage.
...
This saves a tiny bit of space, but also allows for the NT_Value equivalent
of a Value to be provided with no copy cost (will be useful in the C API).
2015-07-16 21:44:37 -07:00
Peter Johnson
9906116d23
Don't base Value on NT_Value.
...
Also use std::string instead of NT_String.
Conversions to/from the internal structures will be done at the interface.
2015-07-16 01:38:27 -07:00
Peter Johnson
27e0f22c04
StringValue: Implictly convert/assign from StringRef.
...
Change-Id: I87f1e60a3e87db66c6efda824f9e66e919f0a5ea
2015-07-12 23:13:43 -07:00
Peter Johnson
5a0fccc9cf
Add unit tests for StringValue and Value.
...
Add unit test framework to CMakeLists.txt.
Fix a couple of bugs found by unit tests.
Change-Id: I2092a7f0570fae0f19f9e083c4837ccefcc4ca1a
2015-07-11 09:33:33 -07:00
Peter Johnson
b66fb68f29
Finish LoadPersistent().
...
Change-Id: I5c4c439dc3d2585f2edae74f78c14f826b091186
2015-07-11 09:33:33 -07:00
Peter Johnson
f6deafee22
Add type-safe wrapper around NT_Value and NT_String.
...
Change-Id: Ib7ef5a6de9c8c7a1f5f6432083d1fb38328438dc
2015-07-11 09:33:33 -07:00
Peter Johnson
d7ca3343bc
File renames.
...
Change-Id: I3fa88f94593941a25f65eaabfcbbca2428613e6c
2015-07-11 09:33:33 -07:00