cJSON_ConfigurationChangeParseEnd

Add a pointer to an end position of parsing to the cJSON_Configuration
object. (Essentially like return_parse_end, but as offset instead of
pointer).
This commit is contained in:
Max Bruckner
2018-02-02 00:57:00 +01:00
parent 95d333b5cf
commit 0474d4d85f
4 changed files with 44 additions and 8 deletions

View File

@@ -420,7 +420,7 @@ static void *failing_realloc(void *pointer, size_t size, void *userdata)
static void ensure_should_fail_on_failed_realloc(void)
{
printbuffer buffer = {NULL, 10, 0, 0, false, {256, false, true, true, {global_allocate_wrapper, global_deallocate_wrapper, failing_realloc}, NULL } };
printbuffer buffer = {NULL, 10, 0, 0, false, {256, false, true, true, {global_allocate_wrapper, global_deallocate_wrapper, failing_realloc}, NULL, NULL } };
buffer.configuration.userdata = &buffer;
buffer.buffer = (unsigned char*)malloc(100);
TEST_ASSERT_NOT_NULL(buffer.buffer);