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

git at videolan.org git at videolan.org
Sat Jun 26 02:14:55 CEST 2010


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

Fix vlc_pgettext

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3f573875f66043bf59609ac4398f09f1478dec4f
---

 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 a05f24e..7a549c2 100644
--- a/include/vlc_common.h
+++ b/include/vlc_common.h
@@ -854,10 +854,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