Export the list header with a new namespace
[babeltrace.git] / types / enum.c
index 5e7b8a4d61dd94f8df96261298bdddb88a240ef6..f425df02badb89afae51dc29be98823241518453 100644 (file)
@@ -3,7 +3,9 @@
  *
  * BabelTrace - Enumeration Type
  *
- * Copyright 2010, 2011 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright 2010-2011 EfficiOS Inc. and Linux Foundation
+ *
+ * Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
@@ -18,6 +20,7 @@
 
 #include <babeltrace/compiler.h>
 #include <babeltrace/format.h>
+#include <babeltrace/types.h>
 #include <stdint.h>
 #include <glib.h>
 
@@ -116,7 +119,7 @@ GArray *enum_uint_to_quark_set(const struct declaration_enum *enum_declaration,
                                 get_uint_v(&v));
 
        /* Range lookup */
-       cds_list_for_each_entry(iter, &enum_declaration->table.range_to_quark, node) {
+       bt_list_for_each_entry(iter, &enum_declaration->table.range_to_quark, node) {
                if (iter->range.start._unsigned > v || iter->range.end._unsigned < v)
                        continue;
                if (!ranges) {
@@ -163,7 +166,7 @@ GArray *enum_int_to_quark_set(const struct declaration_enum *enum_declaration,
                                 get_int_v(&v));
 
        /* Range lookup */
-       cds_list_for_each_entry(iter, &enum_declaration->table.range_to_quark, node) {
+       bt_list_for_each_entry(iter, &enum_declaration->table.range_to_quark, node) {
                if (iter->range.start._signed > v || iter->range.end._signed < v)
                        continue;
                if (!ranges) {
@@ -261,7 +264,7 @@ void enum_signed_insert_range_to_quark(struct declaration_enum *enum_declaration
        struct enum_range_to_quark *rtoq;
 
        rtoq = g_new(struct enum_range_to_quark, 1);
-       cds_list_add(&rtoq->node, &enum_declaration->table.range_to_quark);
+       bt_list_add(&rtoq->node, &enum_declaration->table.range_to_quark);
        rtoq->range.start._signed = start;
        rtoq->range.end._signed = end;
        rtoq->quark = q;
@@ -274,7 +277,7 @@ void enum_unsigned_insert_range_to_quark(struct declaration_enum *enum_declarati
        struct enum_range_to_quark *rtoq;
 
        rtoq = g_new(struct enum_range_to_quark, 1);
-       cds_list_add(&rtoq->node, &enum_declaration->table.range_to_quark);
+       bt_list_add(&rtoq->node, &enum_declaration->table.range_to_quark);
        rtoq->range.start._unsigned = start;
        rtoq->range.end._unsigned = end;
        rtoq->quark = q;
@@ -362,8 +365,8 @@ void _enum_declaration_free(struct declaration *declaration)
        struct enum_range_to_quark *iter, *tmp;
 
        g_hash_table_destroy(enum_declaration->table.value_to_quark_set);
-       cds_list_for_each_entry_safe(iter, tmp, &enum_declaration->table.range_to_quark, node) {
-               cds_list_del(&iter->node);
+       bt_list_for_each_entry_safe(iter, tmp, &enum_declaration->table.range_to_quark, node) {
+               bt_list_del(&iter->node);
                g_free(iter);
        }
        g_hash_table_destroy(enum_declaration->table.quark_to_range_set);
@@ -382,7 +385,7 @@ struct declaration_enum *
                                                            enum_val_equal,
                                                            enum_val_free,
                                                            enum_range_set_free);
-       CDS_INIT_LIST_HEAD(&enum_declaration->table.range_to_quark);
+       BT_INIT_LIST_HEAD(&enum_declaration->table.range_to_quark);
        enum_declaration->table.quark_to_range_set = g_hash_table_new_full(g_direct_hash,
                                                        g_direct_equal,
                                                        NULL, enum_range_set_free);
This page took 0.023972 seconds and 4 git commands to generate.