X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=lib%2Fregistry.c;fp=lib%2Fregistry.c;h=bc2be95ef739215648d5ab709e30dcc93515db1d;hp=bdce0c6d01e9cf306753791f44a588ed5cbe15a8;hb=5b44aff250d4510f7e96447ddc77f0e3ff3f1739;hpb=b04abc0d33636acfb49feaf77284915eb500a885 diff --git a/lib/registry.c b/lib/registry.c index bdce0c6d..bc2be95e 100644 --- a/lib/registry.c +++ b/lib/registry.c @@ -73,7 +73,7 @@ struct bt_format *bt_lookup_format(bt_intern_str name) return NULL; return g_hash_table_lookup(format_registry, - (gconstpointer) (unsigned long) name); + (gconstpointer) GUINT_TO_POINTER(name)); } static void show_format(gpointer key, gpointer value, gpointer user_data) @@ -81,7 +81,7 @@ static void show_format(gpointer key, gpointer value, gpointer user_data) struct walk_data *data = user_data; fprintf(data->fp, "%s%s", data->iter ? ", " : "", - g_quark_to_string((GQuark) (unsigned long) key)); + g_quark_to_string((GQuark) GPOINTER_TO_UINT(key))); data->iter++; } @@ -116,7 +116,7 @@ int bt_register_format(struct bt_format *format) format_refcount_inc(); g_hash_table_insert(format_registry, - (gpointer) (unsigned long) format->name, + GUINT_TO_POINTER(format->name), format); return 0; } @@ -125,7 +125,7 @@ void bt_unregister_format(struct bt_format *format) { assert(bt_lookup_format(format->name)); g_hash_table_remove(format_registry, - (gpointer) (unsigned long) format->name); + GUINT_TO_POINTER(format->name)); format_refcount_dec(); }