Unicode filenames on Windows

Lukáš Lalinský lalinsky at gmail.com
Wed Nov 7 01:13:42 CET 2007


On Ut, 2007-11-06 at 16:54 -0700, Hans Ecke wrote:
> Luk????-
> 
> +#ifdef _WIN32
> +    free((void *)((const char *)name));
> +    free((void *)((const wchar_t *)name));
> +#else
>      free((void *)name);
> +#endif
> 
> That second free should be on wname, right? I'm just a lurker...

Nope, File::FilePrivate has no wname. FileName contains two pointers
(but only one of them is set, the other one is NULL). Type casting of an
instance of the class returns the corresponding pointer. I agree that it
is not very clear, but this is the best solution I could come up with,
while keeping FileName as lightweight as possible and source-code
compatible with previous versions of TagLib.

Lukas




More information about the taglib-devel mailing list