Use glib portable macros to convert gpointer to int
[babeltrace.git] / lib / context.c
index 3617bcd61447775ebb1313b030f59e7c1249d282..56ac320e393e037dc0720826dd06dee519b7d070 100644 (file)
@@ -174,7 +174,7 @@ int bt_context_add_trace(struct bt_context *ctx, const char *path,
 
        /* Add new handle to container */
        g_hash_table_insert(ctx->trace_handles,
-               (gpointer) (unsigned long) handle->id,
+               GUINT_TO_POINTER(handle->id),
                handle);
 
        return handle->id;
@@ -207,7 +207,7 @@ int bt_context_remove_trace(struct bt_context *ctx, int handle_id)
         * automatically.
         */
        if (!g_hash_table_remove(ctx->trace_handles,
-               (gpointer) (unsigned long) handle_id)) {
+               GUINT_TO_POINTER(handle_id))) {
                ret = -ENOENT;
                goto end;
        }
This page took 0.02432 seconds and 4 git commands to generate.