]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* include/grub/i18n.h (gettext): Inline instead of using #define.
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Tue, 18 May 2010 12:00:51 +0000 (14:00 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Tue, 18 May 2010 12:00:51 +0000 (14:00 +0200)
(grub_gettext): Likewise.
(_): Likewise.

ChangeLog
include/grub/i18n.h

index 2ce1c23e3c2113307b2b9189022d81706c5d06ae..4e0f35c1da5a539340eab17bd800ea98af286af8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-05-18  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * include/grub/i18n.h (gettext): Inline instead of using #define.
+       (grub_gettext): Likewise.
+       (_): Likewise.
+
 2010-05-18  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * Makefile.in (CPPFLAGS): Replace -DGRUB_LIBDIR with
index 9e7f52d45e422dd01f6f34c107c646272c0074c5..57ca1c45be1b66dd54fd3fd8d37936f813674918 100644 (file)
@@ -42,17 +42,33 @@ extern const char *(*EXPORT_VAR(grub_gettext)) (const char *s);
    On pre-ANSI systems without 'const', the config.h file is supposed to
    contain "#define const".  */
 # ifdef GRUB_UTIL
-#  define gettext(Msgid) ((const char *) (Msgid))
+static inline const char * __attribute__ ((always_inline))
+gettext (const char *str)
+{
+  return str;
+}
 # else
-#  define grub_gettext(str) ((const char *) (str))
+static inline const char * __attribute__ ((always_inline))
+grub_gettext (const char *str)
+{
+  return str;
+}
 # endif /* GRUB_UTIL */
 
 #endif /* (defined(ENABLE_NLS) && ENABLE_NLS) */
 
 #ifdef GRUB_UTIL
-# define _(str) gettext(str)
+static inline const char * __attribute__ ((always_inline))
+_ (const char *str)
+{
+  return gettext(str);
+}
 #else
-# define _(str) grub_gettext(str)
+static inline const char * __attribute__ ((always_inline))
+_ (const char *str)
+{
+  return grub_gettext(str);
+}
 #endif /* GRUB_UTIL */
 
 #define N_(str) str