MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / cJSON_CreateRaw

Function cJSON_CreateRaw

external/cJSON/cJSON.c:2581–2596  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2579}
2580
2581CJSON_PUBLIC(cJSON *) cJSON_CreateRaw(const char *raw)
2582{
2583 cJSON *item = cJSON_New_Item(&global_hooks);
2584 if(item)
2585 {
2586 item->type = cJSON_Raw;
2587 item->valuestring = (char*)cJSON_strdup((const unsigned char*)raw, &global_hooks);
2588 if(!item->valuestring)
2589 {
2590 cJSON_Delete(item);
2591 return NULL;
2592 }
2593 }
2594
2595 return item;
2596}
2597
2598CJSON_PUBLIC(cJSON *) cJSON_CreateArray(void)
2599{

Callers 1

cJSON_AddRawToObjectFunction · 0.85

Calls 3

cJSON_New_ItemFunction · 0.85
cJSON_strdupFunction · 0.85
cJSON_DeleteFunction · 0.85

Tested by

no test coverage detected