Fri, 07 Jul 2023 20:22:30 +0200
improve the CSV example
docs/src/features.md | file | annotate | diff | comparison | revisions |
--- a/docs/src/features.md Fri Jul 07 20:20:03 2023 +0200 +++ b/docs/src/features.md Fri Jul 07 20:22:30 2023 +0200 @@ -148,11 +148,11 @@ cxMempoolDestroy(pool); return 1; } - CSVData* data = cxMalloc(pool->allocator, sizeof(CSVData)); - data->column_a = fields[0]; - data->column_b = fields[1]; - data->column_c = fields[2]; - cxListAdd(datalist, data); + CSVData data; + data.column_a = fields[0]; + data.column_b = fields[1]; + data.column_c = fields[2]; + cxListAdd(datalist, &data); } // iterate through the list and output the data