namespace the lookup_integer function
[babeltrace.git] / types / variant.c
index ba4179de5b8710ea7e778b8ea64d6155c543c4ca..ebaf43c1fdd463cff09e669627b60adc14950627 100644 (file)
@@ -39,13 +39,13 @@ struct definition *_variant_definition_new(struct declaration *declaration,
 static
 void _variant_definition_free(struct definition *definition);
 
-int variant_rw(struct stream_pos *ppos, struct definition *definition)
+int bt_variant_rw(struct stream_pos *ppos, struct definition *definition)
 {
        struct definition_variant *variant_definition =
                container_of(definition, struct definition_variant, p);
        struct definition *field;
 
-       field = variant_get_current_field(variant_definition);
+       field = bt_variant_get_current_field(variant_definition);
        return generic_rw(ppos, field);
 }
 
@@ -195,14 +195,14 @@ struct definition *
         */
        variant->p.index = root_name ? INT_MAX : index;
        variant->p.name = field_name;
-       variant->p.path = new_definition_path(parent_scope, field_name, root_name);
-       variant->p.scope = new_definition_scope(parent_scope, field_name, root_name);
+       variant->p.path = bt_new_definition_path(parent_scope, field_name, root_name);
+       variant->p.scope = bt_new_definition_scope(parent_scope, field_name, root_name);
 
-       ret = register_field_definition(field_name, &variant->p,
+       ret = bt_register_field_definition(field_name, &variant->p,
                                        parent_scope);
        assert(!ret);
 
-       variant->enum_tag = lookup_path_definition(variant->p.scope->scope_path,
+       variant->enum_tag = bt_lookup_path_definition(variant->p.scope->scope_path,
                                                   variant_declaration->tag_name,
                                                   parent_scope);
                                              
@@ -232,7 +232,7 @@ struct definition *
        variant->current_field = NULL;
        return &variant->p;
 error:
-       free_definition_scope(variant->p.scope);
+       bt_free_definition_scope(variant->p.scope);
        bt_declaration_unref(&variant_declaration->p);
        g_free(variant);
        return NULL;
@@ -251,7 +251,7 @@ void _variant_definition_free(struct definition *definition)
                bt_definition_unref(field);
        }
        bt_definition_unref(variant->enum_tag);
-       free_definition_scope(variant->p.scope);
+       bt_free_definition_scope(variant->p.scope);
        bt_declaration_unref(variant->p.declaration);
        g_ptr_array_free(variant->fields, TRUE);
        g_free(variant);
@@ -301,7 +301,7 @@ bt_untagged_variant_declaration_get_field_from_tag(struct declaration_untagged_v
 /*
  * field returned only valid as long as the field structure is not appended to.
  */
-struct definition *variant_get_current_field(struct definition_variant *variant)
+struct definition *bt_variant_get_current_field(struct definition_variant *variant)
 {
        struct definition_enum *_enum =
                container_of(variant->enum_tag, struct definition_enum, p);
This page took 0.025517 seconds and 4 git commands to generate.