summaryrefslogtreecommitdiff
path: root/luaconf.h
diff options
context:
space:
mode:
Diffstat (limited to 'luaconf.h')
-rw-r--r--luaconf.h34
1 files changed, 24 insertions, 10 deletions
diff --git a/luaconf.h b/luaconf.h
index c7b72b92..bb68289e 100644
--- a/luaconf.h
+++ b/luaconf.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: luaconf.h,v 1.175 2013/01/29 16:00:40 roberto Exp roberto $ 2** $Id: luaconf.h,v 1.176 2013/03/16 21:10:18 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*/
@@ -394,13 +394,15 @@
394 394
395 395
396/* 396/*
397@@ LUA_NUMBER_SCAN is the format for reading numbers. 397@@ LUA_NUMBER_FRMLEN is the length modifier for writing floats.
398@@ LUA_NUMBER_FMT is the format for writing numbers. 398@@ LUA_NUMBER_SCAN is the format for reading floats.
399@@ lua_number2str converts a number to a string. 399@@ LUA_NUMBER_FMT is the format for writing floats.
400@@ lua_number2str converts a floats to a string.
400@@ LUAI_MAXNUMBER2STR is maximum size of previous conversion. 401@@ LUAI_MAXNUMBER2STR is maximum size of previous conversion.
401*/ 402*/
403#define LUA_NUMBER_FRMLEN ""
402#define LUA_NUMBER_SCAN "%lf" 404#define LUA_NUMBER_SCAN "%lf"
403#define LUA_NUMBER_FMT "%.14g" 405#define LUA_NUMBER_FMT "%.14" LUA_NUMBER_FRMLEN "g"
404#define lua_number2str(s,n) sprintf((s), LUA_NUMBER_FMT, (n)) 406#define lua_number2str(s,n) sprintf((s), LUA_NUMBER_FMT, (n))
405#define LUAI_MAXNUMBER2STR 32 /* 16 digits, sign, point, and \0 */ 407#define LUAI_MAXNUMBER2STR 32 /* 16 digits, sign, point, and \0 */
406 408
@@ -457,13 +459,25 @@
457** CHANGE that if ptrdiff_t is not adequate on your machine. (On most 459** CHANGE that if ptrdiff_t is not adequate on your machine. (On most
458** machines, ptrdiff_t gives a good choice between int or long.) 460** machines, ptrdiff_t gives a good choice between int or long.)
459*/ 461*/
460#define LUA_INTEGER ptrdiff_t 462#define LUA_INTEGER long long
461 463
462/* 464/*
463@@ LUA_UNSIGNED is the integral type used by lua_pushunsigned/lua_tounsigned. 465@@ LUA_UNSIGNED is the unsigned version of LUA_INTEGER.
464** It must have at least 32 bits.
465*/ 466*/
466#define LUA_UNSIGNED unsigned LUA_INT32 467#define LUA_UNSIGNED unsigned long long
468
469/*
470@@ LUA_INTEGER_FRMLEN is the length modifier for writing integers.
471@@ LUA_INTEGER_SCAN is the format for reading integers.
472@@ LUA_INTEGER_FMT is the format for writing integers.
473@@ lua_integer2str converts an integer to a string.
474@@ LUAI_MAXINTEGER2STR is maximum size of previous conversion.
475*/
476#define LUA_INTEGER_FRMLEN "ll"
477#define LUA_INTEGER_SCAN "%Ld"
478#define LUA_INTEGER_FMT "%" LUA_INTEGER_FRMLEN "d"
479#define lua_integer2str(s,n) sprintf((s), LUA_INTEGER_FMT, (n))
480#define LUA_MAXINTEGER2STR 32
467 481
468 482
469 483
@@ -471,7 +485,7 @@
471** Some tricks with doubles 485** Some tricks with doubles
472*/ 486*/
473 487
474#if defined(LUA_NUMBER_DOUBLE) && !defined(LUA_ANSI) /* { */ 488#if defined(LUA_NUMBER_DOUBLE) && !defined(LUA_ANSI) && 0 /* { */
475/* 489/*
476** The next definitions activate some tricks to speed up the 490** The next definitions activate some tricks to speed up the
477** conversion from doubles to integer types, mainly to LUA_UNSIGNED. 491** conversion from doubles to integer types, mainly to LUA_UNSIGNED.