diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2013-04-26 10:08:29 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2013-04-26 10:08:29 -0300 |
commit | a2f5c28a802ae99f2045ab96585fade2c65b2037 (patch) | |
tree | eb2ab3d1fc8dc2084505ed4286502ed75b6721ba /luaconf.h | |
parent | a80a2b5e561b50c1f64e96c3692614611a325aba (diff) | |
download | lua-a2f5c28a802ae99f2045ab96585fade2c65b2037.tar.gz lua-a2f5c28a802ae99f2045ab96585fade2c65b2037.tar.bz2 lua-a2f5c28a802ae99f2045ab96585fade2c65b2037.zip |
new operation '//' (integer division)
Diffstat (limited to 'luaconf.h')
-rw-r--r-- | luaconf.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: luaconf.h,v 1.176 2013/03/16 21:10:18 roberto Exp roberto $ | 2 | ** $Id: luaconf.h,v 1.177 2013/04/25 13:52:13 roberto Exp roberto $ |
3 | ** Configuration file for Lua | 3 | ** Configuration file for Lua |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -435,6 +435,7 @@ | |||
435 | /* the following operations need the math library */ | 435 | /* the following operations need the math library */ |
436 | #if defined(lobject_c) || defined(lvm_c) | 436 | #if defined(lobject_c) || defined(lvm_c) |
437 | #include <math.h> | 437 | #include <math.h> |
438 | #define luai_numidiv(L,a,b) (l_mathop(floor)((a)/(b))) | ||
438 | #define luai_nummod(L,a,b) ((a) - l_mathop(floor)((a)/(b))*(b)) | 439 | #define luai_nummod(L,a,b) ((a) - l_mathop(floor)((a)/(b))*(b)) |
439 | #define luai_numpow(L,a,b) (l_mathop(pow)(a,b)) | 440 | #define luai_numpow(L,a,b) (l_mathop(pow)(a,b)) |
440 | #endif | 441 | #endif |