MCPcopy Index your code
hub / github.com/antirez/botlib / cJSON_CreateRaw

Function cJSON_CreateRaw

cJSON.c:2496–2511  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2494}
2495
2496CJSON_PUBLIC(cJSON *) cJSON_CreateRaw(const char *raw)
2497{
2498 cJSON *item = cJSON_New_Item(&global_hooks);
2499 if(item)
2500 {
2501 item->type = cJSON_Raw;
2502 item->valuestring = (char*)cJSON_strdup((const unsigned char*)raw, &global_hooks);
2503 if(!item->valuestring)
2504 {
2505 cJSON_Delete(item);
2506 return NULL;
2507 }
2508 }
2509
2510 return item;
2511}
2512
2513CJSON_PUBLIC(cJSON *) cJSON_CreateArray(void)
2514{

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