aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2003-04-28 16:58:06 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2003-04-28 16:58:06 -0300
commitbcc5f1406b210afdd37a508c4d44093fb80c5742 (patch)
tree78012e442120c0acccf066fd9993e55b8cf86d77
parentb1b752fb2ba8ad64a1defe7849202052be193fbb (diff)
downloadlua-bcc5f1406b210afdd37a508c4d44093fb80c5742.tar.gz
lua-bcc5f1406b210afdd37a508c4d44093fb80c5742.tar.bz2
lua-bcc5f1406b210afdd37a508c4d44093fb80c5742.zip
test function for lua_setgcthreshold
-rw-r--r--ltests.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/ltests.c b/ltests.c
index 71006bb5..b3f6d56b 100644
--- a/ltests.c
+++ b/ltests.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltests.c,v 1.157 2003/04/03 13:35:34 roberto Exp roberto $ 2** $Id: ltests.c,v 1.158 2003/04/07 14:35:00 roberto Exp roberto $
3** Internal Module for Debugging of the Lua Implementation 3** Internal Module for Debugging of the Lua Implementation
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -253,6 +253,12 @@ static int get_limits (lua_State *L) {
253} 253}
254 254
255 255
256static int setgcthreshold (lua_State *L) {
257 lua_setgcthreshold(L, luaL_checkint(L, 1));
258 return 0;
259}
260
261
256static int mem_query (lua_State *L) { 262static int mem_query (lua_State *L) {
257 if (lua_isnone(L, 1)) { 263 if (lua_isnone(L, 1)) {
258 lua_pushintegral(L, memdebug_total); 264 lua_pushintegral(L, memdebug_total);
@@ -808,6 +814,7 @@ static const struct luaL_reg tests_funcs[] = {
808 {"doremote", doremote}, 814 {"doremote", doremote},
809 {"log2", log2_aux}, 815 {"log2", log2_aux},
810 {"int2fb", int2fb_aux}, 816 {"int2fb", int2fb_aux},
817 {"setgcthreshold", setgcthreshold},
811 {"totalmem", mem_query}, 818 {"totalmem", mem_query},
812 {"resume", coresume}, 819 {"resume", coresume},
813 {"setyhook", setyhook}, 820 {"setyhook", setyhook},