Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
From: jdesfossez@efficios.com (Julien Desfossez)
Subject: [lttng-dev] [BABELTRACE PATCH] Namespace the lookup_enum function
Date: Wed,  9 Jan 2013 14:48:13 -0500	[thread overview]
Message-ID: <1357760893-11961-1-git-send-email-jdesfossez@efficios.com> (raw)
In-Reply-To: <20130107211855.GB3678@Krystal>

This patch namespaces the lookup_enum function because it causes problem
with the integration in gdb even though it is not exported.
Hui, can you try this patch and confirm it solves the current problem ?
After that we will continue the internal namespacing.

Thanks,

Julien
---
 formats/ctf/ctf.c          |    2 +-
 include/babeltrace/types.h |    2 +-
 types/types.c              |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/formats/ctf/ctf.c b/formats/ctf/ctf.c
index 18a5601..a8f8408 100644
--- a/formats/ctf/ctf.c
+++ b/formats/ctf/ctf.c
@@ -431,7 +431,7 @@ int ctf_read_event(struct stream_pos *ppos, struct ctf_stream_definition *stream
 		} else {
 			struct definition_enum *enum_definition;
 
-			enum_definition = lookup_enum(&stream->stream_event_header->p, "id", FALSE);
+			enum_definition = bt_lookup_enum(&stream->stream_event_header->p, "id", FALSE);
 			if (enum_definition) {
 				id = enum_definition->integer->value._unsigned;
 			}
diff --git a/include/babeltrace/types.h b/include/babeltrace/types.h
index b42ba03..00c928b 100644
--- a/include/babeltrace/types.h
+++ b/include/babeltrace/types.h
@@ -521,7 +521,7 @@ struct definition *lookup_definition(const struct definition *definition,
 struct definition_integer *lookup_integer(const struct definition *definition,
 					  const char *field_name,
 					  int signedness);
-struct definition_enum *lookup_enum(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,
diff --git a/types/types.c b/types/types.c
index 5599027..139e318 100644
--- a/types/types.c
+++ b/types/types.c
@@ -642,7 +642,7 @@ struct definition_integer *lookup_integer(const struct definition *definition,
 	return lookup_integer;
 }
 
-struct definition_enum *lookup_enum(const struct definition *definition,
+struct definition_enum *bt_lookup_enum(const struct definition *definition,
 				    const char *field_name,
 				    int signedness)
 {
-- 
1.7.10.4




  reply	other threads:[~2013-01-09 19:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CANFwon2s-eJoCrhzJmxhoGx9G2NeOAFf-FDFk1SoxD1OhPxWsg@mail.gmail.com>
     [not found] ` <20121205120845.GA31696@Krystal>
     [not found]   ` <50C0C06A.40207@redhat.com>
     [not found]     ` <CANFwon2U61xKrSFVq0wJ0axVKqjz7RzWcOn5vJ3MUEL4JC+VOA@mail.gmail.com>
     [not found]       ` <20121210140524.GA31945@Krystal>
     [not found]         ` <CANFwon2T5CYcjssSyTh_yjV2fgw0N3SZXqytNJQOCR1h2vM8MQ@mail.gmail.com>
     [not found]           ` <CANFwon18bwvqnXe6xVoWS0C3Ls2LQmxy7BDjWf8wj=-iEzd3Qg@mail.gmail.com>
     [not found]             ` <20121220141643.GA22763@Krystal>
     [not found]               ` <CANFwon2wq4ynMEh_L+TuN9ZiTfQ_i+QksdK4y3=KLFaYB_fjBQ@mail.gmail.com>
2013-01-07 21:18                 ` [lttng-dev] Request change name of function lookup_enum in libbabeltrace to make GDB use this lib Mathieu Desnoyers
2013-01-09 19:48                   ` Julien Desfossez [this message]
2013-01-13 17:57                     ` [lttng-dev] [BABELTRACE PATCH] Namespace the lookup_enum function Mathieu Desnoyers
2013-01-24 17:43                       ` Julien Desfossez
2013-01-25 11:16                         ` Hui Zhu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1357760893-11961-1-git-send-email-jdesfossez@efficios.com \
    --to=jdesfossez@efficios.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox