[vlc-devel] [PATCH 1/2] compat: add realpath used by test_media_subitems()
Jean-Baptiste Kempf
jb at videolan.org
Thu Sep 15 18:28:37 CEST 2016
On 15 Sep, Steve Lhomme wrote :
> +#ifdef _WIN32
> + int len = MultiByteToWideChar( CP_UTF8, 0, relpath, -1, NULL, 0 );
> + if (len == 0)
> + return NULL;
> +
> + wchar_t *wrelpath = (wchar_t *)malloc(len * sizeof (wchar_t));
> + if (wrelpath == NULL)
> + return NULL;
> +
> + MultiByteToWideChar( CP_UTF8, 0, relpath, -1, wrelpath, len );
Would it work to include vlc_charset.h here and call FromWide and
ToWide, since they are static inlined there?
(I'm not sure, because that header could need vlc_fixup or config.h)
--
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device
More information about the vlc-devel
mailing list