From: Julien Desfossez Date: Thu, 24 Jan 2013 22:25:34 +0000 (-0500) Subject: namespace the lookup_integer function X-Git-Tag: v1.1.0~27 X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=bf78e2cf834756c64e0dfd8b38916c4c827bf0d6 namespace the lookup_integer function Signed-off-by: Julien Desfossez Signed-off-by: Mathieu Desnoyers --- diff --git a/formats/ctf/ctf.c b/formats/ctf/ctf.c index ba403aa6..deb9a66d 100644 --- a/formats/ctf/ctf.c +++ b/formats/ctf/ctf.c @@ -427,7 +427,7 @@ int ctf_read_event(struct stream_pos *ppos, struct ctf_stream_definition *stream if (unlikely(ret)) goto error; /* lookup event id */ - integer_definition = lookup_integer(&stream->stream_event_header->p, "id", FALSE); + integer_definition = bt_lookup_integer(&stream->stream_event_header->p, "id", FALSE); if (integer_definition) { id = integer_definition->value._unsigned; } else { @@ -441,7 +441,7 @@ int ctf_read_event(struct stream_pos *ppos, struct ctf_stream_definition *stream variant = bt_lookup_variant(&stream->stream_event_header->p, "v"); if (variant) { - integer_definition = lookup_integer(variant, "id", FALSE); + integer_definition = bt_lookup_integer(variant, "id", FALSE); if (integer_definition) { id = integer_definition->value._unsigned; } @@ -450,13 +450,13 @@ int ctf_read_event(struct stream_pos *ppos, struct ctf_stream_definition *stream /* lookup timestamp */ stream->has_timestamp = 0; - integer_definition = lookup_integer(&stream->stream_event_header->p, "timestamp", FALSE); + integer_definition = bt_lookup_integer(&stream->stream_event_header->p, "timestamp", FALSE); if (integer_definition) { ctf_update_timestamp(stream, integer_definition); stream->has_timestamp = 1; } else { if (variant) { - integer_definition = lookup_integer(variant, "timestamp", FALSE); + integer_definition = bt_lookup_integer(variant, "timestamp", FALSE); if (integer_definition) { ctf_update_timestamp(stream, integer_definition); stream->has_timestamp = 1; diff --git a/include/babeltrace/types.h b/include/babeltrace/types.h index f01a11c3..d742b40f 100644 --- a/include/babeltrace/types.h +++ b/include/babeltrace/types.h @@ -518,7 +518,7 @@ void bt_append_scope_path(const char *path, GArray *q); */ struct definition *bt_lookup_definition(const struct definition *definition, const char *field_name); -struct definition_integer *lookup_integer(const struct definition *definition, +struct definition_integer *bt_lookup_integer(const struct definition *definition, const char *field_name, int signedness); struct definition_enum *bt_lookup_enum(const struct definition *definition, diff --git a/types/types.c b/types/types.c index 25ce7151..3e20dfe1 100644 --- a/types/types.c +++ b/types/types.c @@ -624,7 +624,7 @@ struct definition *bt_lookup_definition(const struct definition *definition, scope); } -struct definition_integer *lookup_integer(const struct definition *definition, +struct definition_integer *bt_lookup_integer(const struct definition *definition, const char *field_name, int signedness) {