test function for lua_setgcthreshold
This commit is contained in:
9
ltests.c
9
ltests.c
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: ltests.c,v 1.157 2003/04/03 13:35:34 roberto Exp roberto $
|
** $Id: ltests.c,v 1.158 2003/04/07 14:35:00 roberto Exp roberto $
|
||||||
** Internal Module for Debugging of the Lua Implementation
|
** Internal Module for Debugging of the Lua Implementation
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@@ -253,6 +253,12 @@ static int get_limits (lua_State *L) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static int setgcthreshold (lua_State *L) {
|
||||||
|
lua_setgcthreshold(L, luaL_checkint(L, 1));
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static int mem_query (lua_State *L) {
|
static int mem_query (lua_State *L) {
|
||||||
if (lua_isnone(L, 1)) {
|
if (lua_isnone(L, 1)) {
|
||||||
lua_pushintegral(L, memdebug_total);
|
lua_pushintegral(L, memdebug_total);
|
||||||
@@ -808,6 +814,7 @@ static const struct luaL_reg tests_funcs[] = {
|
|||||||
{"doremote", doremote},
|
{"doremote", doremote},
|
||||||
{"log2", log2_aux},
|
{"log2", log2_aux},
|
||||||
{"int2fb", int2fb_aux},
|
{"int2fb", int2fb_aux},
|
||||||
|
{"setgcthreshold", setgcthreshold},
|
||||||
{"totalmem", mem_query},
|
{"totalmem", mem_query},
|
||||||
{"resume", coresume},
|
{"resume", coresume},
|
||||||
{"setyhook", setyhook},
|
{"setyhook", setyhook},
|
||||||
|
|||||||
Reference in New Issue
Block a user