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

Function csv_create

tools/libxo/encoder/csv/enc_csv.c:181–199  ·  view source on GitHub ↗

* Create the private data for this handle, initialize it, and record * the pointer in the handle. */

Source from the content-addressed store, hash-verified

179 * the pointer in the handle.
180 */
181static int
182csv_create (xo_handle_t *xop)
183{
184 csv_private_t *csv = xo_realloc(NULL, sizeof(*csv));
185 if (csv == NULL)
186 return -1;
187
188 bzero(csv, sizeof(*csv));
189 xo_buf_init(&csv->c_data);
190 xo_buf_init(&csv->c_name_buf);
191 xo_buf_init(&csv->c_value_buf);
192#ifdef CSV_STACK_IS_NEEDED
193 xo_buf_init(&csv->c_stack_buf);
194#endif /* CSV_STACK_IS_NEEDED */
195
196 xo_set_private(xop, csv);
197
198 return 0;
199}
200
201/*
202 * Clean up and release any data in use by this handle

Callers 1

csv_handlerFunction · 0.85

Calls 3

bzeroFunction · 0.85
xo_buf_initFunction · 0.85
xo_set_privateFunction · 0.85

Tested by

no test coverage detected