aboutsummaryrefslogtreecommitdiff
path: root/ltests.c
diff options
context:
space:
mode:
Diffstat (limited to 'ltests.c')
-rw-r--r--ltests.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/ltests.c b/ltests.c
index 1caed04c..57530884 100644
--- a/ltests.c
+++ b/ltests.c
@@ -1027,6 +1027,16 @@ static int table_query (lua_State *L) {
1027} 1027}
1028 1028
1029 1029
1030static int query_inc (lua_State *L) {
1031 global_State *g = G(L);
1032 lua_pushinteger(L, gettotalobjs(g));
1033 lua_pushinteger(L, g->GCdebt);
1034 lua_pushinteger(L, getgcparam(g->gcpause));
1035 lua_pushinteger(L, getgcparam(g->gcstepmul));
1036 lua_pushinteger(L, cast(l_mem, 1) << g->gcstepsize);
1037 return 5;
1038}
1039
1030static int string_query (lua_State *L) { 1040static int string_query (lua_State *L) {
1031 stringtable *tb = &G(L)->strt; 1041 stringtable *tb = &G(L)->strt;
1032 int s = cast_int(luaL_optinteger(L, 1, 0)) - 1; 1042 int s = cast_int(luaL_optinteger(L, 1, 0)) - 1;
@@ -1933,6 +1943,7 @@ static const struct luaL_Reg tests_funcs[] = {
1933 {"pushuserdata", pushuserdata}, 1943 {"pushuserdata", pushuserdata},
1934 {"querystr", string_query}, 1944 {"querystr", string_query},
1935 {"querytab", table_query}, 1945 {"querytab", table_query},
1946 {"queryinc", query_inc},
1936 {"ref", tref}, 1947 {"ref", tref},
1937 {"resume", coresume}, 1948 {"resume", coresume},
1938 {"s2d", s2d}, 1949 {"s2d", s2d},