[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: lua_number2int
- From: "Jerome Vuarand" <jerome.vuarand@...>
- Date: Tue, 14 Nov 2006 18:36:39 -0500
Asko Kauppi wrote:
> Me, yesterday, 14:21
>
> > Also "lua_tounsigned()" would be handy.
>
> :) imho, the whole integer support should be revised.
Maybe the best solution is to remove completely integer support. Keep
one type to contain them all. No more lua_Integer or lua_tointeger. Keep
Lua high level and let the user convert the doubles to whatever fits the
C code. tointeger/tounsigned are easy to write above tonumber. As the
thread as shown, default ones are error prone, may cross C definition
boundaries and lead to undefined behaviour (and daemons invasions :-) ).