Add type class/type structure management
[babeltrace.git] / formats / ctf / ctf.c
index 156e39db09233c327f3d6d168d3db0c027e28381..580133cc86c873fef4225e0bf3fbd65ff2019bb8 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Format registration.
  *
- * Copyright 2010 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright 2010, 2011 - 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
@@ -21,7 +21,7 @@
 
 void __attribute__((constructor)) ctf_init(void);
 
-static const struct format ctf_format = {
+static struct format ctf_format = {
        .uint_read = ctf_uint_read,
        .int_read = ctf_int_read,
        .uint_write = ctf_uint_write,
@@ -37,6 +37,8 @@ static const struct format ctf_format = {
        .enum_write = ctf_enum_write,
        .struct_begin = ctf_struct_begin,
        .struct_end = ctf_struct_end,
+       .variant_begin = ctf_variant_begin,
+       .variant_end = ctf_variant_end,
        .array_begin = ctf_array_begin,
        .array_end = ctf_array_end,
        .sequence_begin = ctf_sequence_begin,
@@ -47,7 +49,7 @@ void ctf_init(void)
 {
        int ret;
 
-       ctf_format->name = g_quark_from_static_string("ctf");
+       ctf_format.name = g_quark_from_static_string("ctf");
        ret = bt_register_format(&ctf_format);
        assert(!ret);
 }
This page took 0.024494 seconds and 4 git commands to generate.