MCPcopy Create free account
hub / github.com/OpenDriveLab/OpenLane / cJSON_CreateInt

Function cJSON_CreateInt

eval/LANE_evaluation/lane2d/src/cJSON.c:1015–1026  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1013 return item;
1014}
1015cJSON *cJSON_CreateInt(uint64 num, int sign)
1016{
1017 cJSON *item = cJSON_New_Item();
1018 if (item)
1019 {
1020 item->type = cJSON_Int;
1021 item->valuedouble = (double)num;
1022 item->valueint = (int64)num;
1023 item->sign = sign;
1024 }
1025 return item;
1026}
1027cJSON *cJSON_CreateString(const char *string)
1028{
1029 cJSON *item = cJSON_New_Item();

Callers 3

AddMethod · 0.85
ReplaceMethod · 0.85
AddAsFirstMethod · 0.85

Calls 1

cJSON_New_ItemFunction · 0.85

Tested by

no test coverage detected