Home
last modified time | relevance | path

Searched refs:global_hooks (Results 1 – 12 of 12) sorted by relevance

/third_party/cJSON/
DcJSON.c186 static internal_hooks global_hooks = { internal_malloc, internal_free, internal_realloc }; variable
214 global_hooks.allocate = malloc; in cJSON_InitHooks()
215 global_hooks.deallocate = free; in cJSON_InitHooks()
216 global_hooks.reallocate = realloc; in cJSON_InitHooks()
220 global_hooks.allocate = malloc; in cJSON_InitHooks()
223 global_hooks.allocate = hooks->malloc_fn; in cJSON_InitHooks()
226 global_hooks.deallocate = free; in cJSON_InitHooks()
229 global_hooks.deallocate = hooks->free_fn; in cJSON_InitHooks()
233 global_hooks.reallocate = NULL; in cJSON_InitHooks()
234 if ((global_hooks.allocate == malloc) && (global_hooks.deallocate == free)) in cJSON_InitHooks()
[all …]
/third_party/cJSON/tests/
Dprint_array.c40 parsebuffer.hooks = global_hooks; in assert_print_array()
47 formatted_buffer.hooks = global_hooks; in assert_print_array()
54 unformatted_buffer.hooks = global_hooks; in assert_print_array()
Dprint_object.c41 parsebuffer.hooks = global_hooks; in assert_print_object()
48 formatted_buffer.hooks = global_hooks; in assert_print_object()
55 unformatted_buffer.hooks = global_hooks; in assert_print_object()
Dparse_string.c51 buffer.hooks = global_hooks; in assert_parse_string()
56 global_hooks.deallocate(item->valuestring); in assert_parse_string()
65 buffer.hooks = global_hooks; in assert_not_parse_string()
Dprint_value.c41 buffer.hooks = global_hooks; in assert_print_value()
45 parsebuffer.hooks = global_hooks; in assert_print_value()
Dcommon.h36 global_hooks.deallocate(item->valuestring); in reset()
40 global_hooks.deallocate(item->string); in reset()
Dparse_object.c58 parsebuffer.hooks = global_hooks; in assert_not_object()
70 parsebuffer.hooks = global_hooks; in assert_parse_object()
Dparse_array.c50 buffer.hooks = global_hooks; in assert_not_array()
61 buffer.hooks = global_hooks; in assert_parse_array()
Dprint_string.c35 buffer.hooks = global_hooks; in assert_print_string()
Dparse_value.c49 buffer.hooks = global_hooks; in assert_parse_value()
Dprint_number.c38 buffer.hooks = global_hooks; in assert_print_number()
Dmisc_tests.c460 buffer.hooks = global_hooks; in skip_utf8_bom_should_skip_bom()
472 buffer.hooks = global_hooks; in skip_utf8_bom_should_not_skip_bom_if_not_at_beginning()
569 char *name = (char*)cJSON_strdup((const unsigned char*)"number", &global_hooks); in cjson_add_item_to_object_should_not_use_after_free_when_string_is_aliased()