aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--luaconf.h40
1 files changed, 36 insertions, 4 deletions
diff --git a/luaconf.h b/luaconf.h
index 591dc9d2..668001ca 100644
--- a/luaconf.h
+++ b/luaconf.h
@@ -410,7 +410,7 @@
410/* 410/*
411@@ l_mathop allows the addition of an 'l' or 'f' to all math operations 411@@ l_mathop allows the addition of an 'l' or 'f' to all math operations
412*/ 412*/
413#define l_mathop(x) (x) 413#define l_mathop(x) x
414 414
415 415
416/* 416/*
@@ -464,21 +464,22 @@
464/* 464/*
465@@ LUA_UNSIGNED is the unsigned version of LUA_INTEGER. 465@@ LUA_UNSIGNED is the unsigned version of LUA_INTEGER.
466*/ 466*/
467#define LUA_UNSIGNED unsigned long long 467#define LUA_UNSIGNED unsigned LUA_INTEGER
468 468
469/* 469/*
470@@ LUA_INTEGER_FRMLEN is the length modifier for writing integers. 470@@ LUA_INTEGER_FRMLEN is the length modifier for reading/writing integers.
471@@ LUA_INTEGER_SCAN is the format for reading integers. 471@@ LUA_INTEGER_SCAN is the format for reading integers.
472@@ LUA_INTEGER_FMT is the format for writing integers. 472@@ LUA_INTEGER_FMT is the format for writing integers.
473@@ lua_integer2str converts an integer to a string. 473@@ lua_integer2str converts an integer to a string.
474@@ LUAI_MAXINTEGER2STR is maximum size of previous conversion. 474@@ LUAI_MAXINTEGER2STR is maximum size of previous conversion.
475*/ 475*/
476#define LUA_INTEGER_FRMLEN "ll" 476#define LUA_INTEGER_FRMLEN "ll"
477#define LUA_INTEGER_SCAN "%Ld" 477#define LUA_INTEGER_SCAN "%" LUA_INTEGER_FRMLEN "d"
478#define LUA_INTEGER_FMT "%" LUA_INTEGER_FRMLEN "d" 478#define LUA_INTEGER_FMT "%" LUA_INTEGER_FRMLEN "d"
479#define lua_integer2str(s,n) sprintf((s), LUA_INTEGER_FMT, (n)) 479#define lua_integer2str(s,n) sprintf((s), LUA_INTEGER_FMT, (n))
480#define LUA_MAXINTEGER2STR 32 480#define LUA_MAXINTEGER2STR 32
481 481
482
482/* }================================================================== */ 483/* }================================================================== */
483 484
484 485
@@ -491,7 +492,38 @@
491** without modifying the main part of the file. 492** without modifying the main part of the file.
492*/ 493*/
493 494
495#define LUA_SMALL_INT
496#define LUA_SMALL_FLOAT
497
498
499#if defined(LUA_SMALL_FLOAT) /* { */
500
501#undef LUA_NUMBER_DOUBLE
502
503#undef LUA_NUMBER
504#define LUA_NUMBER float
505
506#undef LUA_NUMBER_SCAN
507#define LUA_NUMBER_SCAN "%f"
508
509#undef LUA_NUMBER_FMT
510#define LUA_NUMBER_FMT "%.7g"
511
512#undef l_mathop
513#define l_mathop(x) x##f
514
515#endif /* } */
516
517
518#if defined (LUA_SMALL_INT) /* { */
519
520#undef LUA_INTEGER
521#define LUA_INTEGER long
522
523#undef LUA_INTEGER_FRMLEN
524#define LUA_INTEGER_FRMLEN "l"
494 525
526#endif /* } */
495 527
496#endif 528#endif
497 529