MCPcopy Create free account
hub / github.com/apache/httpd / jselect_set_new

Function jselect_set_new

modules/md/md_json.c:250–277  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

248}
249
250static apr_status_t jselect_set_new(json_t *val, md_json_t *json, va_list ap)
251{
252 const char *key;
253 json_t *j;
254
255 j = jselect_parent(&key, 1, json, ap);
256
257 if (!j) {
258 json_decref(val);
259 return APR_EINVAL;
260 }
261
262 if (key) {
263 if (!json_is_object(j)) {
264 json_decref(val);
265 return APR_EINVAL;
266 }
267 json_object_set_new(j, key, val);
268 }
269 else {
270 /* replace */
271 if (json->j) {
272 json_decref(json->j);
273 }
274 json->j = val;
275 }
276 return APR_SUCCESS;
277}
278
279int md_json_has_key(const md_json_t *json, ...)
280{

Callers 6

md_json_setbFunction · 0.85
md_json_setnFunction · 0.85
md_json_setlFunction · 0.85
md_json_setsFunction · 0.85
md_json_set_timeFunction · 0.85
md_json_set_timeperiodFunction · 0.85

Calls 1

jselect_parentFunction · 0.85

Tested by

no test coverage detected