Commit af688c8f authored by Jakob Leben's avatar Jakob Leben

services_discovery: fix embedding longname in name, take 2

The longname argument to macro #define VLC_SD_PROBE_HELPER(name, longname, cat)
is usually in the form like N_("some_longname"). Literalization of the argument by
doing # longname in the macro will result in a literal "N_(\"some_longname\")"
instead of translating the long name.
parent 2a2dd551
......@@ -109,9 +109,10 @@ VLC_EXPORT(int, vlc_sd_probe_Add, (vlc_probe_t *, const char *, const char *, in
#define VLC_SD_PROBE_HELPER(name, longname, cat) \
static int vlc_sd_probe_Open (vlc_object_t *obj) \
{ \
char psz_name[ strlen( name ) + strlen( longname ) + 20 ]; \
sprintf( psz_name, "%s{longname=\"%s\"}", name, longname ); \
return vlc_sd_probe_Add ((struct vlc_probe_t *)obj, \
name "{longname=\"" # longname "\"}", \
longname, cat); \
psz_name, longname, cat); \
}
/** @} */
......
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