diff options
Diffstat (limited to 'luaconf.h')
-rw-r--r-- | luaconf.h | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: luaconf.h,v 1.173 2012/07/13 14:54:14 roberto Exp roberto $ | 2 | ** $Id: luaconf.h,v 1.174 2012/10/01 14:14:45 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 | */ |
@@ -406,6 +406,12 @@ | |||
406 | 406 | ||
407 | 407 | ||
408 | /* | 408 | /* |
409 | @@ l_mathop allows the addition of an 'l' or 'f' to all math operations | ||
410 | */ | ||
411 | #define l_mathop(x) (x) | ||
412 | |||
413 | |||
414 | /* | ||
409 | @@ lua_str2number converts a decimal numeric string to a number. | 415 | @@ lua_str2number converts a decimal numeric string to a number. |
410 | @@ lua_strx2number converts an hexadecimal numeric string to a number. | 416 | @@ lua_strx2number converts an hexadecimal numeric string to a number. |
411 | ** In C99, 'strtod' does both conversions. C89, however, has no function | 417 | ** In C99, 'strtod' does both conversions. C89, however, has no function |
@@ -427,8 +433,8 @@ | |||
427 | /* the following operations need the math library */ | 433 | /* the following operations need the math library */ |
428 | #if defined(lobject_c) || defined(lvm_c) | 434 | #if defined(lobject_c) || defined(lvm_c) |
429 | #include <math.h> | 435 | #include <math.h> |
430 | #define luai_nummod(L,a,b) ((a) - floor((a)/(b))*(b)) | 436 | #define luai_nummod(L,a,b) ((a) - l_mathop(floor)((a)/(b))*(b)) |
431 | #define luai_numpow(L,a,b) (pow(a,b)) | 437 | #define luai_numpow(L,a,b) (l_mathop(pow)(a,b)) |
432 | #endif | 438 | #endif |
433 | 439 | ||
434 | /* these are quite standard operations */ | 440 | /* these are quite standard operations */ |