[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] TortoiseIDiff optionally using FreeImage.dll for image loading

From: Norbert Unterberg <nunterberg_at_gmail.com>
Date: 2006-09-27 23:07:34 CEST

2006/9/26, Stefan Küng <tortoisesvn@gmail.com>:

> +#ifdef UNICODE
> +
> +typedef int (__stdcall *FreeImage_GetFileType_t)(const wchar_t
> *filename, int size);
> +
> +#else // !UNICODE
> +
> +typedef int (__stdcall *FreeImage_GetFileType_t)(const char
> *filename, int size);
> +
> +#endif
>
> Here, you could just use TCHAR instead of the #ifdef and using wchar_t*
> and char*.

I don't understand this one. Without knowing about that DLL and the
complete patch, I think this can not be correct. You are declaring
function pointers for a dynamically loaded DLL. The DLL stays the same
no matter if you compile TSVN with _UNICODE setting or not. So the
function prototype must always be either char* or wchar_t*, no matter
what the UNICODE setting is. It only depends on the setting that was
active when the FreeImage.DLL was created.

Norbert

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Wed Sep 27 23:07:41 2006

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.