[Expat-discuss] Re: Pre-release snapshot of Expat 1.95.8
Fred L. Drake, Jr.
fdrake at acm.org
Fri Jul 23 20:43:25 CEST 2004
On Friday 23 July 2004 08:46 am, Mohun Biswas wrote:
> I notice that the signatures for a few functions still use 'int' for a
> length field, e.g.:
...
> Shouldn't the third parameter be "size_t len"? Is there any point to a
> negative length? This causes warnings for me on some platforms, most
> notably Windows. Simply passing the result of strlen() will raise the
> warning, for instance.
I'll try taking a look at this tonight, when I have a Windows box available.
We've generally been very careful to avoid changing the size of parameter
types to avoid introducing binary incompatibility. I vaguely recall that
some systems have different size types for size_t and int, but I don't recall
the details.
Simply making that an "unsigned int" instead of an "int" is probably safe,
though.
-Fred
--
Fred L. Drake, Jr. <fdrake at acm.org>
More information about the Expat-discuss
mailing list