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

Function get_intprop

tools/cdb2_sqlreplay/cdb2_sqlreplay.cpp:114–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112}
113
114bool get_intprop(cson_value *objval, const char *key, int64_t *val) {
115 cson_object *obj;
116 cson_value_fetch_object(objval, &obj);
117 const cson_value *propval = cson_object_get(obj, key);
118 if (propval == nullptr || !cson_value_is_integer(propval))
119 return false;
120 int rc = cson_value_fetch_integer(propval, (cson_int_t*) val);
121 if (rc)
122 return false;
123 return true;
124}
125
126bool get_doubleprop(cson_value *objval, const char *key, double *val) {
127 cson_object *obj;

Callers 3

is_replayableFunction · 0.85
do_bindingsFunction · 0.85
getMethod · 0.85

Calls 4

cson_value_fetch_objectFunction · 0.85
cson_object_getFunction · 0.85
cson_value_is_integerFunction · 0.85
cson_value_fetch_integerFunction · 0.85

Tested by

no test coverage detected