MCPcopy Create free account
hub / github.com/ading2210/linuxpdf / json_string_new2

Function json_string_new2

tinyemu/json.c:200–211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

198}
199
200JSONValue json_string_new2(const char *str, int len)
201{
202 JSONValue val;
203 JSONString *str1;
204
205 str1 = malloc(sizeof(JSONString) + len + 1);
206 str1->len = len;
207 memcpy(str1->data, str, len + 1);
208 val.type = JSON_STR;
209 val.u.str = str1;
210 return val;
211}
212
213JSONValue json_string_new(const char *str)
214{

Callers 1

json_string_newFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected