lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


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 :-) ).