| 184 | } |
| 185 | |
| 186 | static int |
| 187 | cbor_create (xo_handle_t *xop) |
| 188 | { |
| 189 | cbor_private_t *cbor = xo_realloc(NULL, sizeof(*cbor)); |
| 190 | if (cbor == NULL) |
| 191 | return -1; |
| 192 | |
| 193 | bzero(cbor, sizeof(*cbor)); |
| 194 | xo_buf_init(&cbor->c_data); |
| 195 | |
| 196 | xo_set_private(xop, cbor); |
| 197 | |
| 198 | cbor_append(xop, cbor, &cbor->c_data, CBOR_MAP | CBOR_INDEF, 0, NULL); |
| 199 | |
| 200 | return 0; |
| 201 | } |
| 202 | |
| 203 | static int |
| 204 | cbor_content (xo_handle_t *xop, cbor_private_t *cbor, xo_buffer_t *xbp, |
no test coverage detected