From: Sebastian Harl Date: Wed, 11 Jun 2014 09:37:28 +0000 (+0200) Subject: Renamed DBI_TYPE_TO_SC to DBI_TYPE_TO_SDB. X-Git-Tag: sysdb-0.2.0~60 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=53b6beda9705f065a3a208437036376cba9a4e71;p=sysdb.git Renamed DBI_TYPE_TO_SC to DBI_TYPE_TO_SDB. The old name was still from the times the project was called syscollector ;-) --- diff --git a/src/include/utils/dbi.h b/src/include/utils/dbi.h index 9d5cfc0..af2c8a4 100644 --- a/src/include/utils/dbi.h +++ b/src/include/utils/dbi.h @@ -34,7 +34,7 @@ #include /* translate libdbi types to SysDB types */ -#define DBI_TYPE_TO_SC(dt) \ +#define DBI_TYPE_TO_SDB(dt) \ (((dt) == DBI_TYPE_INTEGER) \ ? SDB_TYPE_INTEGER \ : ((dt) == DBI_TYPE_DECIMAL) \ diff --git a/src/utils/dbi.c b/src/utils/dbi.c index b1fdaf1..73fc6b7 100644 --- a/src/utils/dbi.c +++ b/src/utils/dbi.c @@ -194,7 +194,7 @@ sdb_dbi_get_data(sdb_dbi_client_t *client, dbi_result res, sdb_dbi_strerror(client->conn)); return -1; } - types[i] = DBI_TYPE_TO_SC(types[i]); + types[i] = DBI_TYPE_TO_SDB(types[i]); } num_rows = dbi_result_get_numrows(res); @@ -497,7 +497,7 @@ sdb_dbi_exec_query(sdb_dbi_client_t *client, const char *query, unsigned int type = va_arg(types, unsigned int); - field_type = DBI_TYPE_TO_SC(field_type); + field_type = DBI_TYPE_TO_SDB(field_type); /* column count starts at 1 */ if ((unsigned int)field_type != type) { diff --git a/t/unit/utils/dbi_test.c b/t/unit/utils/dbi_test.c index 1ad96d1..2935940 100644 --- a/t/unit/utils/dbi_test.c +++ b/t/unit/utils/dbi_test.c @@ -527,7 +527,7 @@ query_callback(sdb_dbi_client_t *c, user_data, TEST_MAGIC); for (i = 0; i < n; ++i) { - int expected_type = DBI_TYPE_TO_SC(current_query->field_types[i]); + int expected_type = DBI_TYPE_TO_SDB(current_query->field_types[i]); mock_data_t expected_data; fail_unless((int)data[i].type == expected_type,