[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: More thoughts on Lua 5.2
- From: David Given <dg@...>
- Date: Fri, 22 Feb 2008 03:25:31 +0000
Miles Bader wrote:
Duck <firstname.lastname@example.org> writes:
3. An I/O library compatible with 'io' but using the OS's own low-level
routines, not FILE *. (Inability to work with files > 2GB is a great
annoyance when using Lua on Linux or Windows. Point it at such a file and
it's lost -- seems a rather depressing singularity to me.)
Er, shouldn't the C library be able to handle large files using FILE?
Yes, but you typically have to use a slightly different set of APIs ---
fseeko() instead of fseek(), for example, in order to get the 64-bit
Also, 64 bit file offsets can't be expressed inside a standard Lua
number (which only have 32 bits of integer precision). I'm not sure how
you'd work around this.