Boris Kolpackov wrote:
Hi David,
David Bertoni <[EMAIL PROTECTED]> writes:
There seems to be lots of progress on moving the APIs to XMLSize_t from
unsigned int. However, there are still places in the code where
unsigned int and int are still used.
There are tons of places where int/long is used instead of XMLSize_t.
While most of them are straightforward to move to XMLSize_t, there are
places with really rotten code, for example, signed int is used to
return length and -1 is returned to indicate an error (so this code
is not even 32-bit safe). Such places will require more effort to
port.
Exactly. But changing these int return types to XMLSSize_t (signed size
type) should be safe, correct?
I've decide to split this effort into two parts: first is to move
all public (or at least often used) interfaces to XMLSize_t (so far
I have ported dom/, sax/, and sax2/; framework/, parsers/, and
util/ are in the works). This will address the more pressing issue
of allowing people write (theoretically) 64-bit safe applications
using Xerces-C++ without constantly casting things back and forth.
The second part it to change the implementation to use XMLSize_t.
This one will require a substantial and mind numbing effort. I
personally don't plan to do it for 3.0.0 (it can take weeks). Since
the interface will be 64-bit compatible it will be possible to fix
this in, say, 3.1.0.
Well, I'd prefer to change things for the 3.0.0 release, but I agree it
could be painful. Let me do some investigation and see what I find.
I would be happy to help update these, if that's the plan.
Feel free to pitch in (maybe wait a few days before I finish changing
the interfaces). I think it would be great if we can clean this up for
3.0.0. Also watch out for those tricky cases I mentioned above.
I will start on a patch to move the template collection classes from
unsigned int to XMLSize_t, which should be safe. There are also some
places where ints are used as keys for the hash tables. I believe those
should be safe to move to XMLSSize_t or XMLSize_t, as they are used in a
handful of places. I doubt anyone is using these externally, as they
are not nearly as good the standard collection classes in the C++ library.
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]