[vlc-commits] commit: Fix vlc_pgettext ( Rémi Denis-Courmont )

git at videolan.org git at videolan.org
Sat Jun 26 02:58:54 CEST 2010


vlc/vlc-1.1 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Jun 26 03:16:31 2010 +0300| [516bb2b9fcf5cd58316b630290b3e9da13494f6d] | committer: Rémi Denis-Courmont 

Fix vlc_pgettext

(cherry picked from commit 3f573875f66043bf59609ac4398f09f1478dec4f)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=516bb2b9fcf5cd58316b630290b3e9da13494f6d
---

 include/vlc_common.h |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/include/vlc_common.h b/include/vlc_common.h
index c138d89..01a5acb 100644
--- a/include/vlc_common.h
+++ b/include/vlc_common.h
@@ -856,10 +856,13 @@ VLC_EXPORT( void *, vlc_memset, ( void *, int, size_t ) );
  *****************************************************************************/
 VLC_EXPORT( char *, vlc_gettext, ( const char *msgid ) LIBVLC_FORMAT_ARG(1) );
 
+#define vlc_pgettext( ctx, id ) \
+        vlc_pgettext_aux( ctx "\004" id, id )
+
 LIBVLC_FORMAT_ARG(2)
-static inline const char *vlc_pgettext( const char *ctx, const char *id )
+static inline const char *vlc_pgettext_aux( const char *ctx, const char *id )
 {
-    const char *tr = vlc_gettext( id );
+    const char *tr = vlc_gettext( ctx );
     return (tr == ctx) ? id : tr;
 }
 



More information about the vlc-commits mailing list