MCPcopy Create free account
hub / github.com/bloomberg/comdb2 / cson_value_new_array

Function cson_value_new_array

cson/cson.c:482–490  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

480 return get->value;
481}
482cson_value *cson_value_new_array(void)
483{
484 cson_value *val = calloc(1, sizeof(cson_value));
485 val->sql_type = SQLITE_TEXT;
486 cson__parse(val, "[]", 2);
487 cson_array *arr = &val->u.arr;
488 jsonInit(&arr->str, NULL);
489 return val;
490}
491char cson_value_is_array(cson_value const *v)
492{
493 return cson__type(v) == JSON_ARRAY;

Callers 14

test_aFunction · 0.85
test_cFunction · 0.85
test_dFunction · 0.85
test_fFunction · 0.85
test_hFunction · 0.85
test_nFunction · 0.85
test_oFunction · 0.85
test_pFunction · 0.85
get_bind_arrayFunction · 0.85
eventlog_tablesFunction · 0.85
eventlog_contextFunction · 0.85
eventlog_pathFunction · 0.85

Calls 3

callocFunction · 0.85
cson__parseFunction · 0.85
jsonInitFunction · 0.85

Tested by 8

test_aFunction · 0.68
test_cFunction · 0.68
test_dFunction · 0.68
test_fFunction · 0.68
test_hFunction · 0.68
test_nFunction · 0.68
test_oFunction · 0.68
test_pFunction · 0.68