aboutsummaryrefslogtreecommitdiff
path: root/luaconf.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2015-01-13 15:24:22 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2015-01-13 15:24:22 -0200
commit3f2e21f0ea97e09cf4d6360803705b9d9281a215 (patch)
treebd7e37a7b9a8d75ccf80e07cbe48798bf5958ce3 /luaconf.h
parent35099149165bd0120b0c46ce0bc5ca32210db56d (diff)
downloadlua-3f2e21f0ea97e09cf4d6360803705b9d9281a215.tar.gz
lua-3f2e21f0ea97e09cf4d6360803705b9d9281a215.tar.bz2
lua-3f2e21f0ea97e09cf4d6360803705b9d9281a215.zip
Long double needs a larger LUAL_BUFFERSIZE (because
'string.format("%.99f", 1e4900)' can generate quite long strings), but otherwise buffer can be 1~2K
Diffstat (limited to 'luaconf.h')
-rw-r--r--luaconf.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/luaconf.h b/luaconf.h
index 69075810..ff5dc8ef 100644
--- a/luaconf.h
+++ b/luaconf.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: luaconf.h,v 1.237 2014/12/26 14:44:44 roberto Exp roberto $ 2** $Id: luaconf.h,v 1.238 2014/12/29 13:27:55 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*/
@@ -702,9 +702,16 @@
702 702
703/* 703/*
704@@ LUAL_BUFFERSIZE is the buffer size used by the lauxlib buffer system. 704@@ LUAL_BUFFERSIZE is the buffer size used by the lauxlib buffer system.
705** CHANGE it if it uses too much C-stack space. 705** CHANGE it if it uses too much C-stack space. (For long double,
706** 'string.format("%.99f", 1e4932)' needs ~5030 bytes, so a
707** smaller buffer would force a memory allocation for each call to
708** 'string.format'.)
706*/ 709*/
707#define LUAL_BUFFERSIZE ((int)(0x80 * sizeof(void*) * sizeof(lua_Integer))) 710#if defined(LUA_REAL_LONGDOUBLE)
711#define LUAL_BUFFERSIZE 8192
712#else
713#define LUAL_BUFFERSIZE (256 * (int)sizeof(lua_Integer))
714#endif
708 715
709/* }================================================================== */ 716/* }================================================================== */
710 717