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

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

From: Will Wilson <willw_at_fireflyworlds.com>
Date: 2006-09-27 23:35:35 CEST

> > +#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

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.