curl-library
Re: yangtse: curl/lib sendf.c,1.125,1.126 sendf.h,1.33,1.34
Date: Wed, 21 Mar 2007 11:42:51 +0100
2007/3/21, Daniel Stenberg wrote:
> > Modified Files:
> > sendf.c sendf.h
> > Log Message:
> > avoid the use of variadic macros for greater portability
>
> This does indeed increase portability but now the function calls are left
> as-is, and just makes the target function body empty. I bet this will cause
> lots of strings to be left in the code that previously weren't, thanks to the
> now removed variadic macros...
Yes completely true. And not a good idea to keep around strings that
aren't going to be used.
The fact was that the variadic macro was being used to 'comment out'
the 'infof' macro when CURL_DISABLE_VERBOSE_STRINGS was defined.
To not break anything I suppose that the above behaviour is the
desired one, and not the other option I've been thinking of which
would be to use DEBUGF(infof(data, x, y, z)) all over the place.
Or maybe better...
#ifdef CURL_DISABLE_VERBOSE_STRINGS
#define VERBOSEF(x) do { } while (0)
#else
#define VERBOSEF(x) x
#endif
and surround all 'infof' which aren't already inside DEBUGF
Or just leave it as it was previously even when one of Dan's auto
builds is complaining due to the use of --disable-verbose ?
http://curl.haxx.se/auto/log.cgi?id=20070320113520-30561
Which route is the proper one ?
-- -=[Yang]=-Received on 2007-03-21