ctf.fs: bt_ctf_notif_iter_create(): assert() that all medops exist
[babeltrace.git] / types / enum.c
index e967e14d17da58dc8b68b0250622c2cf245ac21d..455e60ab72702416b1943d945534311bd0c8eeb2 100644 (file)
@@ -41,7 +41,7 @@
 #endif
 
 static
-struct bt_definition *_enum_definition_new(struct declaration *declaration,
+struct bt_definition *_enum_definition_new(struct bt_declaration *declaration,
                                        struct definition_scope *parent_scope,
                                        GQuark field_name, int index,
                                        const char *root_name);
@@ -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);
@@ -374,7 +374,7 @@ size_t bt_enum_get_nr_enumerators(struct declaration_enum *enum_declaration)
 }
 
 static
-void _enum_declaration_free(struct declaration *declaration)
+void _enum_declaration_free(struct bt_declaration *declaration)
 {
        struct declaration_enum *enum_declaration =
                container_of(declaration, struct declaration_enum, p);
@@ -418,7 +418,7 @@ struct declaration_enum *
 
 static
 struct bt_definition *
-       _enum_definition_new(struct declaration *declaration,
+       _enum_definition_new(struct bt_declaration *declaration,
                             struct definition_scope *parent_scope,
                             GQuark field_name, int index,
                             const char *root_name)
@@ -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;
This page took 0.02545 seconds and 4 git commands to generate.