diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-04-03 11:18:19 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-04-03 11:18:19 -0300 |
commit | 8b45d9806aec534d7b0b788da887c4b421c5395d (patch) | |
tree | 582bc2e11a9425ec28cdbeccde9967daee74af3f /lmathlib.c | |
parent | be52f784d90a4a84a45a8c8474d2a8989b64f3a3 (diff) | |
download | lua-8b45d9806aec534d7b0b788da887c4b421c5395d.tar.gz lua-8b45d9806aec534d7b0b788da887c4b421c5395d.tar.bz2 lua-8b45d9806aec534d7b0b788da887c4b421c5395d.zip |
new constants 'math.maxint'/'math.minint'
Diffstat (limited to 'lmathlib.c')
-rw-r--r-- | lmathlib.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lmathlib.c,v 1.93 2014/03/31 19:00:52 roberto Exp roberto $ | 2 | ** $Id: lmathlib.c,v 1.94 2014/04/01 14:39:55 roberto Exp roberto $ |
3 | ** Standard mathematical library | 3 | ** Standard mathematical library |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -316,6 +316,10 @@ LUAMOD_API int luaopen_math (lua_State *L) { | |||
316 | lua_setfield(L, -2, "pi"); | 316 | lua_setfield(L, -2, "pi"); |
317 | lua_pushnumber(L, HUGE_VAL); | 317 | lua_pushnumber(L, HUGE_VAL); |
318 | lua_setfield(L, -2, "huge"); | 318 | lua_setfield(L, -2, "huge"); |
319 | lua_pushinteger(L, LUA_MAXINTEGER); | ||
320 | lua_setfield(L, -2, "maxint"); | ||
321 | lua_pushinteger(L, LUA_MININTEGER); | ||
322 | lua_setfield(L, -2, "minint"); | ||
319 | return 1; | 323 | return 1; |
320 | } | 324 | } |
321 | 325 | ||