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

Function jselect_set

modules/md/md_json.c:222–248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

220}
221
222static apr_status_t jselect_set(json_t *val, md_json_t *json, va_list ap)
223{
224 const char *key;
225 json_t *j;
226
227 j = jselect_parent(&key, 1, json, ap);
228
229 if (!j) {
230 return APR_EINVAL;
231 }
232
233 if (key) {
234 if (!json_is_object(j)) {
235 return APR_EINVAL;
236 }
237 json_object_set(j, key, val);
238 }
239 else {
240 /* replace */
241 if (json->j) {
242 json_decref(json->j);
243 }
244 json_incref(val);
245 json->j = val;
246 }
247 return APR_SUCCESS;
248}
249
250static apr_status_t jselect_set_new(json_t *val, md_json_t *json, va_list ap)
251{

Callers 2

md_json_setjFunction · 0.85
md_json_copy_toFunction · 0.85

Calls 1

jselect_parentFunction · 0.85

Tested by

no test coverage detected