From: Jonathan Nieder <jrnieder@gmail.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH/RFC v7 1/2] Add infrastructure for translating Git with gettext
Date: Sat, 5 Jun 2010 13:59:26 -0500 [thread overview]
Message-ID: <20100605185926.GA5273@progeny.tock> (raw)
In-Reply-To: <AANLkTim3PcoLrYb46Bh3tK7Ir3v-K0EQ0czPaD5DIIOK@mail.gmail.com>
Hi Ævar,
Thanks for trying it out.
Ævar Arnfjörð Bjarmason wrote:
> --- a/gettext.c
> +++ b/gettext.c
> @@ -1,11 +1,8 @@
> -#ifdef NO_GETTEXT
> -void git_setup_gettext(void) {}
> -#else
> #include "exec_cmd.h"
> #include <libintl.h>
> #include <stdlib.h>
>
> -void git_setup_gettext(void) {
> +inline void git_setup_gettext(void) {
This should not be inline when NO_GETTEXT is unset, since other
translation units don’t get a chance to see the definition.
> diff --git a/gettext.h b/gettext.h
> index a99da6a..8d44808 100644
> --- a/gettext.h
> +++ b/gettext.h
> @@ -1,7 +1,11 @@
> #ifndef GETTEXT_H
> #define GETTEXT_H
>
> -void git_setup_gettext(void);
> +#ifdef NO_GETTEXT
> +static inline void git_setup_gettext(void) {}
> +#else
> +inline void git_setup_gettext(void);
> +#endif
With s/^inline \(.*;\)/extern &/, to make it:
-void git_setup_gettext(void);
+#ifdef NO_GETTEXT
+static inline void git_setup_gettext(void) {}
+#else
+extern void git_setup_gettext(void);
+#endif
this part is exactly how I was imagining it (i.e., like might_fault()
in linux-2.6/include/linux/kernel.h and many other examples).
Thanks again.
Jonathan
next prev parent reply other threads:[~2010-06-05 18:59 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-05 2:13 [PATCH/RFC v7 0/2] Add infrastructure for translating Git with gettext Ævar Arnfjörð Bjarmason
2010-06-05 2:13 ` [PATCH/RFC v7 1/2] " Ævar Arnfjörð Bjarmason
2010-06-05 2:57 ` Jonathan Nieder
2010-06-05 3:28 ` Ævar Arnfjörð Bjarmason
2010-06-05 3:36 ` Jonathan Nieder
2010-06-05 15:19 ` Ævar Arnfjörð Bjarmason
2010-06-05 19:27 ` Jonathan Nieder
2010-06-05 19:47 ` Ævar Arnfjörð Bjarmason
2010-06-12 17:26 ` Jonathan Nieder
2010-06-05 3:01 ` Jonathan Nieder
2010-06-05 3:30 ` Ævar Arnfjörð Bjarmason
2010-06-05 3:38 ` Jonathan Nieder
2010-06-05 14:10 ` Ævar Arnfjörð Bjarmason
2010-06-05 18:59 ` Jonathan Nieder [this message]
2010-06-05 19:33 ` Ævar Arnfjörð Bjarmason
2010-06-05 20:16 ` Inline functions (Re: [PATCH/RFC v7 1/2] Add infrastructure for translating Git with gettext) Jonathan Nieder
2010-06-05 13:57 ` [PATCH/RFC v7 1/2] Add infrastructure for translating Git with gettext Jakub Narebski
2010-06-05 16:19 ` Ævar Arnfjörð Bjarmason
2010-06-05 2:13 ` [PATCH/RFC v7 2/2] Add initial C, Shell and Perl gettext translations Ævar Arnfjörð Bjarmason
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=20100605185926.GA5273@progeny.tock \
--to=jrnieder@gmail.com \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.