type classes: hash table
[babeltrace.git] / lib / types / enum.c
index cae154784070e20b0dbba6122d2d7ff4ff50e4a0..507d0c35e9ef0d26bffcbe1cb9a3eedaa04858e5 100644 (file)
@@ -3,9 +3,21 @@
  *
  * Enumeration mapping strings (quarks) from/to integers.
  *
- * Copyright 2010 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright (c) 2010 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
- * Dual LGPL v2.1/GPL v2 license.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 #include <ctf/ctf-types.h>
@@ -148,10 +160,10 @@ struct enum_table *enum_new(void)
        struct enum_table *table;
 
        table = g_new(struct enum_table, 1);
-       table->value_to_quark = g_hash_table_new_full(enum_val_hash,
-                                                     enum_val_equal,
-                                                     enum_val_free, NULL);
-       table->quark_to_value = g_hash_table_new(g_direct_hash, g_direct_equal);
+       table->value_to_quark = g_hash_table(enum_val_hash, enum_val_equal);
+       table->quark_to_value = g_hash_table_new_full(g_direct_hash,
+                                                     g_direct_equal,
+                                                     NULL, enum_val_free);
 }
 
 void enum_destroy(struct enum_table *table)
This page took 0.023225 seconds and 4 git commands to generate.