Re: 64 bit integers in Expat 2.0?

Nick MacDonald <[email protected]>
Newsgroups gmane.text.xml.expat.general
Message-ID <[email protected]>
I'm guessing that people that need to support huge files (>2GB) generally
know this.  You could add some simple checking in the code.

When the file is first opened, do a stat on it and see if its too huge, and
large file support not enabled:

#ifndef EXPAT_HUGE_FILE_SUPPORT
if currentFileSize() >0xffffffff then
{
  return warningOrErrorCode;
}
#endif


Otherwise you just make a suitable type and hope that people writing new
code are willing to adapt:

#ifdef EXPAT_HUGE_FILE_SUPPORT
typedef uint64 xmlFilePos_t;
#else
typedef unit32 xmlFilePos_t;
#endif

Nick


On 11/29/05, Karl Waclawek <[email protected]> wrote:
>
>
> We are trying to decide whether we should change some API return values
> to 64 bit integers to support file sizes > 2GB. Affected would be these
> API members:
>
> XML_GetCurrentByteIndex()
> XML_GetCurrentByteCount()
> XML_GetCurrentLineNumber()
> XML_GetCurrentColumnNumber()
>
> Obviously this requires applications to be recompiled.
>
> The question is, how "breaking" would that change be?
> How many applications are actually using these members?
>
> Should this be delayed after the release of Expat 2.0?
>
> Karl
> _______________________________________________
> Expat-discuss mailing list
> [email protected]
> http://mail.libexpat.org/mailman/listinfo/expat-discuss
>



--
Nick MacDonald
[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.