> > +#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.
It's safe enough, basically the DLL in question exports both UNICODE &
ASCII versions of certain functions. So the code was just there to link
to the appropriate export for TortoiseIDiff.
Will.
---------------------------------------------------------------------
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:36:12 2006