* by this function. If the format is not specified then filter and counters
* try to use SCOLS_JSON_* types, if also not define than defaults to string.
*
- * If simple string conversion is not possible then application (which want to
- * use filters and counters) needs to define data function. See
- * scols_column_set_datafunc().
+ * If a simple string conversion is not possible then application (which want
+ * to use filters and counters) needs to define data function to do the
+ * conversion. See scols_column_set_datafunc().
*
* Returns: 0, a negative value in case of an error.
*
*/
int scols_column_get_data_type(const struct libscols_column *cl)
{
- return cl->data_type;;
+ return cl->data_type;
}
/**
* scols_column_get_table:
if (n->type != SCOLS_DATA_NONE)
return 0; /* already set */
- if (n->col->data_type)
+ if (scols_column_get_data_type(n->col))
/* use by application defined type */
- n->type = n->col->data_type;
+ n->type = scols_column_get_data_type(n->col);
else {
/* use by JSON defined type, default to string if not specified */
switch (n->col->json_type) {
if (ce)
data = cl->datafunc(n->col, ce, cl->datafunc_data);
if (data)
- rc = param_set_data(n, cl->data_type, data);
+ rc = param_set_data(n, scols_column_get_data_type(cl), data);
} else {
/* read column data, use it as string */
data = scols_line_get_column_data(ln, n->col);