MCPcopy Create free account
hub / github.com/TheForceEngine/TheForceEngine / cJSON_CreateRaw

Function cJSON_CreateRaw

TheForceEngine/TFE_System/cJSON.c:2515–2530  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2513}
2514
2515CJSON_PUBLIC(cJSON *) cJSON_CreateRaw(const char *raw)
2516{
2517 cJSON *item = cJSON_New_Item(&global_hooks);
2518 if(item)
2519 {
2520 item->type = cJSON_Raw;
2521 item->valuestring = (char*)cJSON_strdup((const unsigned char*)raw, &global_hooks);
2522 if(!item->valuestring)
2523 {
2524 cJSON_Delete(item);
2525 return NULL;
2526 }
2527 }
2528
2529 return item;
2530}
2531
2532CJSON_PUBLIC(cJSON *) cJSON_CreateArray(void)
2533{

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