[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: time_t always an integer?
- From: Mike Pall <mikelu-0601@...>
- Date: Wed, 11 Jan 2006 17:46:15 +0100
Hi,
Asko Kauppi wrote:
> Lua 5.1 beta still uses "pushNumber" in the os.time() function, but
> as far as I know, any 'time_t' is always an integer, albeit the
> interpretation of that value may differ. Is this right?
time_t is always an integral value, but not necessarily an 'int'
and not necessarily 32 bits. It's an int64 on many (but not all)
64 bit systems (but int is still 32 bits there!). Even some 32 bit
systems have switched to int64 (e.g. MSVC8) and others will follow.
> If so, the return of os.time() should imho use "pushInteger()" [...]
Nope. This would truncate time_t to an int. See above.
Bye,
Mike