* Create the private data for this handle, initialize it, and record * the pointer in the handle. */
| 179 | * the pointer in the handle. |
| 180 | */ |
| 181 | static int |
| 182 | csv_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 |
no test coverage detected