On Wed, Mar 25, 2009 at 08:33:28AM -0400, Jorge Arellano Cid wrote:
On Wed, Mar 25, 2009 at 01:21:25AM +0100, Joerg Sonnenberger wrote:
On Wed, Mar 25, 2009 at 12:03:05AM +0000, corvid wrote:
Jorge wrote:
Skimming the code it looks like the cast to long for int is the way to go. If a:
- URL_DATA(url)->len, content_type->str, + (long)URL_DATA(url)->len, content_type->str,
solves it. I'd commit it and let the explanation come after the patch.
I was thinking of adding long casts for the Content-Length headers in file.c as well. Sound good?
Shouldn't that be (s)size_t?
The parameter is specified as %ld, so long seems OK.
I think Joerg is suggesting to switch the len field of struct Dstr to size_t/ssize_t and to use this consistently (e.g. using %zd for printing it). Standard string functions also use size_t for string length. Cheers, Johannes