aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-10-06 16:28:47 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-10-06 16:28:47 -0300
commitcd3d44695775631271d9d038247fe64092f13f33 (patch)
tree34008ca2cb4cca0e3702930c9bc87ad693aeec70
parentf01e6c6f1dc8e82faa782020556de9073b683be7 (diff)
downloadlua-cd3d44695775631271d9d038247fe64092f13f33.tar.gz
lua-cd3d44695775631271d9d038247fe64092f13f33.tar.bz2
lua-cd3d44695775631271d9d038247fe64092f13f33.zip
detail
-rw-r--r--llimits.h5
-rw-r--r--lstate.c4
2 files changed, 5 insertions, 4 deletions
diff --git a/llimits.h b/llimits.h
index a164d766..3a56d97e 100644
--- a/llimits.h
+++ b/llimits.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: llimits.h,v 1.15 2000/09/29 12:42:13 roberto Exp roberto $ 2** $Id: llimits.h,v 1.16 2000/10/03 14:03:21 roberto Exp roberto $
3** Limits, basic types, and some other "installation-dependent" definitions 3** Limits, basic types, and some other "installation-dependent" definitions
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -42,7 +42,8 @@
42typedef LUA_NUM_TYPE Number; 42typedef LUA_NUM_TYPE Number;
43 43
44/* function to convert a Number to a string */ 44/* function to convert a Number to a string */
45#define lua_number2str(s,n) sprintf((s), "%.16g", (n)) 45#define NUMBER_FMT "%.16g" /* LUA_NUMBER */
46#define lua_number2str(s,n) sprintf((s), NUMBER_FMT, (n))
46 47
47/* function to convert a string to a Number */ 48/* function to convert a string to a Number */
48#define lua_str2number(s,p) strtod((s), (p)) 49#define lua_str2number(s,p) strtod((s), (p))
diff --git a/lstate.c b/lstate.c
index e4e0bc33..9a3df644 100644
--- a/lstate.c
+++ b/lstate.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lstate.c,v 1.42 2000/09/29 12:42:13 roberto Exp roberto $ 2** $Id: lstate.c,v 1.43 2000/10/05 13:00:17 roberto Exp roberto $
3** Global State 3** Global State
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -89,7 +89,7 @@ lua_State *lua_open (int stacksize) {
89 lua_close(L); 89 lua_close(L);
90 return NULL; 90 return NULL;
91 } 91 }
92 L->GCthreshold = L->nblocks*4; 92 L->GCthreshold = 2*L->nblocks;
93 return L; 93 return L;
94} 94}
95 95