| 71 | } |
| 72 | |
| 73 | static md_json_t *json_create(apr_pool_t *pool, json_t *j) |
| 74 | { |
| 75 | md_json_t *json; |
| 76 | |
| 77 | if (!j) { |
| 78 | apr_abortfunc_t abfn = apr_pool_abort_get(pool); |
| 79 | if (abfn) { |
| 80 | abfn(APR_ENOMEM); |
| 81 | } |
| 82 | assert(j != NULL); /* failsafe in case abort is unset */ |
| 83 | } |
| 84 | json = apr_pcalloc(pool, sizeof(*json)); |
| 85 | json->p = pool; |
| 86 | json->j = j; |
| 87 | apr_pool_cleanup_register(pool, json, json_pool_cleanup, apr_pool_cleanup_null); |
| 88 | |
| 89 | return json; |
| 90 | } |
| 91 | |
| 92 | md_json_t *md_json_create(apr_pool_t *pool) |
| 93 | { |
no outgoing calls
no test coverage detected