sqlite3_stmt *stmt,
GHashTable *tuples)
{
- gint * id;
+ gint id;
const gchar *method = NULL;
- id = (gint *)g_malloc (sizeof(gint));
- *id = sqlite3_column_int (stmt, 0);
+ id = sqlite3_column_int (stmt, 0);
method = (const gchar *)sqlite3_column_text (stmt, 1);
- g_hash_table_insert(tuples, id, g_strdup (method));
+ g_hash_table_insert(tuples, GINT_TO_POINTER(id), g_strdup (method));
return TRUE;
}
g_return_val_if_fail (GSIGNOND_DB_IS_SQL_DATABASE (self), 0);
g_return_val_if_fail (self->priv->db != NULL, 0);
- tuples = g_hash_table_new_full ((GHashFunc)g_int_hash,
- (GEqualFunc)g_int_equal,
- (GDestroyNotify)g_free,
+ tuples = g_hash_table_new_full ((GHashFunc)g_direct_hash,
+ (GEqualFunc)g_direct_equal,
+ (GDestroyNotify)NULL,
(GDestroyNotify)g_free);
rows = gsignond_db_sql_database_query_exec (GSIGNOND_DB_SQL_DATABASE (self),