mirror of
https://github.com/mdbtools/mdbtools.git
synced 2026-03-10 00:20:54 +08:00
Remove GLib dependency WIP
Add a shim implementing half-assed versions of most of the GLib functions used by MDB Tools. If GLib is detected at compile-time, use it, otherwise use the shim. This work is not complete, as the option-parsing code is not yet implemented - so most of the command-line tools crash.
This commit is contained in:
@@ -58,7 +58,7 @@ static int GetNextItem (FILE* stream, char** name, char** value);
|
||||
#endif //HAVE_SQLGETPRIVATEPROFILESTRING
|
||||
|
||||
static void visit (gpointer key, gpointer value, gpointer user_data);
|
||||
static gboolean cleanup (gpointer key, gpointer value, gpointer user_data);
|
||||
static void cleanup (gpointer key, gpointer value, gpointer user_data);
|
||||
|
||||
/*
|
||||
* Allocate create a ConnectParams object
|
||||
@@ -91,7 +91,7 @@ void FreeConnectParams (ConnectParams* params)
|
||||
g_string_free (params->iniFileName, TRUE);
|
||||
if (params->table)
|
||||
{
|
||||
g_hash_table_foreach_remove (params->table, cleanup, NULL);
|
||||
g_hash_table_foreach (params->table, cleanup, NULL);
|
||||
g_hash_table_destroy (params->table);
|
||||
}
|
||||
g_free(params);
|
||||
@@ -514,12 +514,10 @@ static void visit (gpointer key, gpointer value, gpointer user_data)
|
||||
fprintf(output, "Parameter: %s, Value: %s\n", (char*)key, (char*)value);
|
||||
}
|
||||
|
||||
static gboolean cleanup (gpointer key, gpointer value, gpointer user_data)
|
||||
static void cleanup (gpointer key, gpointer value, gpointer user_data)
|
||||
{
|
||||
g_free (key);
|
||||
g_free (value);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user