]> mj.ucw.cz Git - libucw.git/commit
Table: Clean up column list parsing
authorMartin Mares <mj@ucw.cz>
Fri, 30 May 2014 14:26:31 +0000 (16:26 +0200)
committerMartin Mares <mj@ucw.cz>
Fri, 30 May 2014 14:26:31 +0000 (16:26 +0200)
commita78f4d8d259ba15b0a4d618d51facf4d4ca2e20f
treef981fdb284a998a85951189e71e6370318b8987e
parent78ad0f615d029e348fb6cc7b214f92b582e7cc03
Table: Clean up column list parsing

First of all, an empty list of columns is a little bit obscure,
but still correct and it should work properly.

table_col_order_by_name() now returns a sensible error message
for non-existent columns.

table_get_col_list() now uses ", " as a separator, which is more
readable. It is documented where the string is allocated from. Also,
it uses the growing string in mempool properly, even in cases when
it is reallocated.

table_start() does not leak memory.
ucw/table-test.t
ucw/table.c
ucw/table.h