mirror of
https://github.com/DaveGamble/cJSON.git
synced 2026-11-01 13:10:45 +00:00
cJSON.c: Pass allocation functions through internal functions
This is the first step in removing the global allocator functions. Every internal function now only accesses its locally available set of allocators.
This commit is contained in:
1 parent
56b819bfbc
commit
68cd0d4a11
11 files changed
+138
-133
No files matched your search
@@ -37,7 +37,7 @@ static void assert_print_number(const char *expected, double input)
|
||||
memset(item, 0, sizeof(item));
|
||||
cJSON_SetNumberValue(item, input);
|
||||
|
||||
TEST_ASSERT_NOT_NULL_MESSAGE(print_number(item, &buffer), "Failed to print number.");
|
||||
TEST_ASSERT_NOT_NULL_MESSAGE(print_number(item, &buffer, &global_hooks), "Failed to print number.");
|
||||
TEST_ASSERT_EQUAL_STRING_MESSAGE(expected, buffer.buffer, "Printed number is not as expected.");
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user