MCPcopy Create free account
hub / github.com/F-Stack/f-stack / cbor_create

Function cbor_create

tools/libxo/encoder/cbor/enc_cbor.c:186–201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

184}
185
186static int
187cbor_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
203static int
204cbor_content (xo_handle_t *xop, cbor_private_t *cbor, xo_buffer_t *xbp,

Callers 1

cbor_handlerFunction · 0.85

Calls 4

bzeroFunction · 0.85
xo_buf_initFunction · 0.85
xo_set_privateFunction · 0.85
cbor_appendFunction · 0.85

Tested by

no test coverage detected