X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=types%2Fenum.c;h=455e60ab72702416b1943d945534311bd0c8eeb2;hb=f3985ab106d89d8e764c1a8dd0c8bda09b755d10;hp=8394e1b35b70b4e2c58b2a9d9ed97d1293eb2c3c;hpb=ecc54f11c258cad6b54d35da83e525d32c032397;p=babeltrace.git diff --git a/types/enum.c b/types/enum.c index 8394e1b3..455e60ab 100644 --- a/types/enum.c +++ b/types/enum.c @@ -270,7 +270,7 @@ GArray *bt_enum_quark_to_range_set(const struct declaration_enum *enum_declarati GQuark q) { return g_hash_table_lookup(enum_declaration->table.quark_to_range_set, - (gconstpointer) (unsigned long) q); + (gconstpointer) GUINT_TO_POINTER(q)); } static @@ -319,12 +319,12 @@ void bt_enum_signed_insert(struct declaration_enum *enum_declaration, } array = g_hash_table_lookup(enum_declaration->table.quark_to_range_set, - (gconstpointer) (unsigned long) q); + (gconstpointer) GUINT_TO_POINTER(q)); if (!array) { array = g_array_sized_new(FALSE, TRUE, sizeof(struct enum_range), 1); g_hash_table_insert(enum_declaration->table.quark_to_range_set, - (gpointer) (unsigned long) q, + GUINT_TO_POINTER(q), array); } g_array_set_size(array, array->len + 1); @@ -354,12 +354,12 @@ void bt_enum_unsigned_insert(struct declaration_enum *enum_declaration, } array = g_hash_table_lookup(enum_declaration->table.quark_to_range_set, - (gconstpointer) (unsigned long) q); + (gconstpointer) GUINT_TO_POINTER(q)); if (!array) { array = g_array_sized_new(FALSE, TRUE, sizeof(struct enum_range), 1); g_hash_table_insert(enum_declaration->table.quark_to_range_set, - (gpointer) (unsigned long) q, + GUINT_TO_POINTER(q), array); } g_array_set_size(array, array->len + 1); @@ -449,7 +449,7 @@ struct bt_definition * definition_integer_parent = enum_declaration->integer_declaration->p.definition_new(&enum_declaration->integer_declaration->p, _enum->p.scope, - g_quark_from_static_string("container"), 0, NULL); + g_quark_from_string("container"), 0, NULL); _enum->integer = container_of(definition_integer_parent, struct definition_integer, p); return &_enum->p;