aboutsummaryrefslogtreecommitdiff
path: root/luaconf.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2015-05-20 14:39:23 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2015-05-20 14:39:23 -0300
commit99391e24ea25641b0cf419334229452cef9e8581 (patch)
tree6e7db5e57f3fabb4c03270d19e280a91969608ae /luaconf.h
parent0ec12c1bd1ff5f42450703bdbd48f29a2d5e78f8 (diff)
downloadlua-99391e24ea25641b0cf419334229452cef9e8581.tar.gz
lua-99391e24ea25641b0cf419334229452cef9e8581.tar.bz2
lua-99391e24ea25641b0cf419334229452cef9e8581.zip
new configuration macro 'l_mathlim' (simplifies some dependencies
on float type)
Diffstat (limited to 'luaconf.h')
-rw-r--r--luaconf.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/luaconf.h b/luaconf.h
index b5966a4d..5d8ce755 100644
--- a/luaconf.h
+++ b/luaconf.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: luaconf.h,v 1.249 2015/03/31 12:00:07 roberto Exp roberto $ 2** $Id: luaconf.h,v 1.250 2015/04/03 18:41:57 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*/
@@ -404,16 +404,14 @@
404 404
405/* 405/*
406@@ LUA_NUMBER is the floating-point type used by Lua. 406@@ LUA_NUMBER is the floating-point type used by Lua.
407**
408@@ LUAI_UACNUMBER is the result of an 'usual argument conversion' 407@@ LUAI_UACNUMBER is the result of an 'usual argument conversion'
409@@ over a floating number. 408@@ over a floating number.
410** 409@@ l_mathlim(x) corrects limit name 'x' to the proper float type
410** by prefixing it with one of FLT/DBL/LDBL.
411@@ LUA_NUMBER_FRMLEN is the length modifier for writing floats. 411@@ LUA_NUMBER_FRMLEN is the length modifier for writing floats.
412@@ LUA_NUMBER_FMT is the format for writing floats. 412@@ LUA_NUMBER_FMT is the format for writing floats.
413@@ lua_number2str converts a float to a string. 413@@ lua_number2str converts a float to a string.
414**
415@@ l_mathop allows the addition of an 'l' or 'f' to all math operations. 414@@ l_mathop allows the addition of an 'l' or 'f' to all math operations.
416**
417@@ lua_str2number converts a decimal numeric string to a number. 415@@ lua_str2number converts a decimal numeric string to a number.
418*/ 416*/
419 417
@@ -421,6 +419,8 @@
421 419
422#define LUA_NUMBER float 420#define LUA_NUMBER float
423 421
422#define l_mathlim(n) (FLT_##n)
423
424#define LUAI_UACNUMBER double 424#define LUAI_UACNUMBER double
425 425
426#define LUA_NUMBER_FRMLEN "" 426#define LUA_NUMBER_FRMLEN ""
@@ -435,6 +435,8 @@
435 435
436#define LUA_NUMBER long double 436#define LUA_NUMBER long double
437 437
438#define l_mathlim(n) (LDBL_##n)
439
438#define LUAI_UACNUMBER long double 440#define LUAI_UACNUMBER long double
439 441
440#define LUA_NUMBER_FRMLEN "L" 442#define LUA_NUMBER_FRMLEN "L"
@@ -448,6 +450,8 @@
448 450
449#define LUA_NUMBER double 451#define LUA_NUMBER double
450 452
453#define l_mathlim(n) (DBL_##n)
454
451#define LUAI_UACNUMBER double 455#define LUAI_UACNUMBER double
452 456
453#define LUA_NUMBER_FRMLEN "" 457#define LUA_NUMBER_FRMLEN ""
@@ -620,7 +624,7 @@
620#if !defined(LUA_USE_C89) && defined(__STDC_VERSION__) && \ 624#if !defined(LUA_USE_C89) && defined(__STDC_VERSION__) && \
621 __STDC_VERSION__ >= 199901L 625 __STDC_VERSION__ >= 199901L
622#include <stdint.h> 626#include <stdint.h>
623#if defined (INTPTR_MAX) /* even in C99 this type is optional */ 627#if defined(INTPTR_MAX) /* even in C99 this type is optional */
624#undef LUA_KCONTEXT 628#undef LUA_KCONTEXT
625#define LUA_KCONTEXT intptr_t 629#define LUA_KCONTEXT intptr_t
626#endif 630#endif