[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: reallycheckint(L,index)
- From: Dirk Laurie <dirk.laurie@...>
- Date: Wed, 29 May 2013 08:22:39 +0200
I can't believe the following is the best way of not happily
accepting pi=3 etc. Too many calls to genuine functions as
distinct from macros.
#define reallycheckint(L,index) (\
lua_pushinteger(L,luaL_checkint(L,index)),\
luaL_argcheck(L,lua_compare(L,index,-1,LUA_OPEQ),index,"expected integer"),\
lua_pop(L,1), lua_tointeger(L,index) )
But every time I try to improve on it I need to store something
in a C variable.