lua-users home
lua-l archive

Re: llimits.h redefines/ignores lua_number2int specified in luaconf.h

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


> This is from Lua 5.2.1. I suppose I should update to 5.2.2, was it fixed
> there?
I may be wrong, but I think all definitions of lua_number2int in
llimits.h are protected by some previous define (either MS_ASMTRICK
or LUA_MSASMTRICK or LUA_IEEE754TRICK). If you undefine all them in
luaconf.h, then llimits.h will respect your definition:
 /* the following definitions always work, but may be slow */
 
 #if !defined(lua_number2int)
 #define lua_number2int(i,n) ((i)=(int)(n))
 #endif
 ...
-- Roberto

AltStyle によって変換されたページ (->オリジナル) /