Commit 3f573875 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Fix vlc_pgettext

parent ae74559c
...@@ -854,10 +854,13 @@ VLC_EXPORT( void *, vlc_memset, ( void *, int, size_t ) ); ...@@ -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) ); 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) 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; return (tr == ctx) ? id : tr;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment