[lttng-dev] [BABELTRACE PATCH 11/18] namespace the string functions

Julien Desfossez jdesfossez at efficios.com
Thu Jan 24 16:21:43 EST 2013


Signed-off-by: Julien Desfossez <jdesfossez at efficios.com>
---
 formats/ctf/events.c                                  |    2 +-
 formats/ctf/metadata/ctf-visitor-generate-io-struct.c |    2 +-
 include/babeltrace/types.h                            |    6 +++---
 types/string.c                                        |    6 +++---
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/formats/ctf/events.c b/formats/ctf/events.c
index 036ce46..3660c04 100644
--- a/formats/ctf/events.c
+++ b/formats/ctf/events.c
@@ -601,7 +601,7 @@ char *bt_ctf_get_string(const struct definition *field)
 	char *ret = NULL;
 
 	if (field && bt_ctf_field_type(bt_ctf_get_decl_from_def(field)) == CTF_TYPE_STRING)
-		ret = get_string(field);
+		ret = bt_get_string(field);
 	else
 		bt_ctf_field_set_error(-EINVAL);
 
diff --git a/formats/ctf/metadata/ctf-visitor-generate-io-struct.c b/formats/ctf/metadata/ctf-visitor-generate-io-struct.c
index 94dd0c8..bdb9f5f 100644
--- a/formats/ctf/metadata/ctf-visitor-generate-io-struct.c
+++ b/formats/ctf/metadata/ctf-visitor-generate-io-struct.c
@@ -1558,7 +1558,7 @@ struct declaration *ctf_declaration_string_visit(FILE *fd, int depth,
 	}
 	if (encoding_c && !strcmp(encoding_c, "ASCII"))
 		encoding = CTF_STRING_ASCII;
-	string_declaration = string_declaration_new(encoding);
+	string_declaration = bt_string_declaration_new(encoding);
 	return &string_declaration->p;
 }
 
diff --git a/include/babeltrace/types.h b/include/babeltrace/types.h
index a0c5467..da69b91 100644
--- a/include/babeltrace/types.h
+++ b/include/babeltrace/types.h
@@ -426,9 +426,9 @@ struct declaration_enum *
 	bt_enum_declaration_new(struct declaration_integer *integer_declaration);
 
 struct declaration_string *
-	string_declaration_new(enum ctf_string_encoding encoding);
-char *get_string(const struct definition *field);
-enum ctf_string_encoding get_string_encoding(const struct definition *field);
+	bt_string_declaration_new(enum ctf_string_encoding encoding);
+char *bt_get_string(const struct definition *field);
+enum ctf_string_encoding bt_get_string_encoding(const struct definition *field);
 
 struct declaration_struct *
 	struct_declaration_new(struct declaration_scope *parent_scope,
diff --git a/types/string.c b/types/string.c
index cebce12..255388f 100644
--- a/types/string.c
+++ b/types/string.c
@@ -48,7 +48,7 @@ void _string_declaration_free(struct declaration *declaration)
 }
 
 struct declaration_string *
-	string_declaration_new(enum ctf_string_encoding encoding)
+	bt_string_declaration_new(enum ctf_string_encoding encoding)
 {
 	struct declaration_string *string_declaration;
 
@@ -109,7 +109,7 @@ void _string_definition_free(struct definition *definition)
 	g_free(string);
 }
 
-enum ctf_string_encoding get_string_encoding(const struct definition *field)
+enum ctf_string_encoding bt_get_string_encoding(const struct definition *field)
 {
 	struct definition_string *string_definition;
 	const struct declaration_string *string_declaration;
@@ -120,7 +120,7 @@ enum ctf_string_encoding get_string_encoding(const struct definition *field)
 	return string_declaration->encoding;
 }
 
-char *get_string(const struct definition *field)
+char *bt_get_string(const struct definition *field)
 {
 	struct definition_string *string_definition =
 		container_of(field, struct definition_string, p);
-- 
1.7.10.4




More information about the lttng-dev mailing list