namespace the variant functions
authorJulien Desfossez <jdesfossez@efficios.com>
Thu, 24 Jan 2013 22:25:00 +0000 (17:25 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 24 Jan 2013 22:25:00 +0000 (17:25 -0500)
Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
formats/ctf-text/types/variant.c
formats/ctf/ctf.c
formats/ctf/types/variant.c
include/babeltrace/types.h
types/types.c
types/variant.c

index 89d518a9455fefba77c1298d15b29cffed104560..e7e50ace953ca03d16bba960c206589bf5c6ff82 100644 (file)
@@ -52,7 +52,7 @@ int ctf_text_variant_write(struct stream_pos *ppos, struct definition *definitio
        }
        field_nr_saved = pos->field_nr;
        pos->field_nr = 0;
-       ret = variant_rw(ppos, definition);
+       ret = bt_variant_rw(ppos, definition);
        if (!pos->dummy) {
                pos->depth--;
                if (pos->depth >= 0) {
index e2a109ba85e2ba28e739b3e2d74f28d2f2ed4f89..ba403aa629e2b0bfdcd5a5370b2ead441db9fea1 100644 (file)
@@ -439,7 +439,7 @@ int ctf_read_event(struct stream_pos *ppos, struct ctf_stream_definition *stream
                        }
                }
 
-               variant = lookup_variant(&stream->stream_event_header->p, "v");
+               variant = bt_lookup_variant(&stream->stream_event_header->p, "v");
                if (variant) {
                        integer_definition = lookup_integer(variant, "id", FALSE);
                        if (integer_definition) {
index 297f26ff5feb3f9e739e82fb8c7582f3dec6dfca..f3559f55ebae7242a8c6394f824481ef0abc59a2 100644 (file)
@@ -34,5 +34,5 @@ int ctf_variant_rw(struct stream_pos *ppos, struct definition *definition)
        struct ctf_stream_pos *pos = ctf_pos(ppos);
 
        ctf_align_pos(pos, declaration->alignment);
-       return variant_rw(ppos, definition);
+       return bt_variant_rw(ppos, definition);
 }
index 84d0c95b64f75ceb9029af27597c9ba63fff360e..60bd4fdb583f43c1ee613efd7d05e92bd1684055 100644 (file)
@@ -479,8 +479,8 @@ int variant_definition_set_tag(struct definition_variant *variant,
  * field returned only valid as long as the variant structure is not appended
  * to.
  */
-struct definition *variant_get_current_field(struct definition_variant *variant);
-int variant_rw(struct stream_pos *pos, struct definition *definition);
+struct definition *bt_variant_get_current_field(struct definition_variant *variant);
+int bt_variant_rw(struct stream_pos *pos, struct definition *definition);
 
 /*
  * elem_declaration passed as parameter now belongs to the array. No
@@ -524,7 +524,7 @@ struct definition_integer *lookup_integer(const struct definition *definition,
 struct definition_enum *bt_lookup_enum(const struct definition *definition,
                                    const char *field_name,
                                    int signedness);
-struct definition *lookup_variant(const struct definition *definition,
+struct definition *bt_lookup_variant(const struct definition *definition,
                                  const char *field_name);
 
 static inline
index 912c8d53ab67f922208560125020c6f7a8269e17..d60e5772a4d8556107a5392f2e96158e7b13e903 100644 (file)
@@ -660,19 +660,19 @@ struct definition_enum *bt_lookup_enum(const struct definition *definition,
        return lookup_enum;
 }
 
-struct definition *lookup_variant(const struct definition *definition,
+struct definition *bt_lookup_variant(const struct definition *definition,
                                  const char *field_name)
 {
        struct definition *lookup;
-       struct definition_variant *lookup_variant;
+       struct definition_variant *bt_lookup_variant;
 
        lookup = lookup_definition(definition, field_name);
        if (!lookup)
                return NULL;
        if (lookup->declaration->id != CTF_TYPE_VARIANT)
                return NULL;
-       lookup_variant = container_of(lookup, struct definition_variant, p);
-       lookup = variant_get_current_field(lookup_variant);
+       bt_lookup_variant = container_of(lookup, struct definition_variant, p);
+       lookup = bt_variant_get_current_field(bt_lookup_variant);
        assert(lookup);
        return lookup;
 }
index ba4179de5b8710ea7e778b8ea64d6155c543c4ca..837875c1ac5097694cd08d4b763a20826081a9d2 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);
 }
 
@@ -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.040302 seconds and 4 git commands to generate.