Add cJSON_Allocators new style allocator struct

This commit is contained in:
Max Bruckner
2018-02-03 16:42:56 +01:00
parent 649af9c2c3
commit 440ba84d08
5 changed files with 90 additions and 52 deletions
+1 -1
View File
@@ -53,7 +53,7 @@ static void assert_parse_string(const char *string, const char *expected)
TEST_ASSERT_TRUE_MESSAGE(parse_string(item, &buffer), "Couldn't parse string.");
assert_is_string(item);
TEST_ASSERT_EQUAL_STRING_MESSAGE(expected, item->valuestring, "The parsed result isn't as expected.");
global_configuration.deallocate(item->valuestring);
global_configuration.allocators.deallocate(item->valuestring, global_configuration.userdata);
item->valuestring = NULL;
}