diff options
Diffstat (limited to 'inout.c')
-rw-r--r-- | inout.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -5,7 +5,7 @@ | |||
5 | ** Also provides some predefined lua functions. | 5 | ** Also provides some predefined lua functions. |
6 | */ | 6 | */ |
7 | 7 | ||
8 | char *rcs_inout="$Id: inout.c,v 2.57 1997/04/06 14:14:27 roberto Exp roberto $"; | 8 | char *rcs_inout="$Id: inout.c,v 2.58 1997/04/15 17:32:47 roberto Exp roberto $"; |
9 | 9 | ||
10 | #include <stdio.h> | 10 | #include <stdio.h> |
11 | #include <string.h> | 11 | #include <string.h> |
@@ -310,6 +310,11 @@ static void rawsettable (void) | |||
310 | } | 310 | } |
311 | 311 | ||
312 | 312 | ||
313 | static void luaI_collectgarbage (void) | ||
314 | { | ||
315 | lua_pushnumber(lua_collectgarbage(luaL_opt_number(1, 0))); | ||
316 | } | ||
317 | |||
313 | 318 | ||
314 | /* | 319 | /* |
315 | ** Internal functions | 320 | ** Internal functions |
@@ -320,6 +325,7 @@ static struct { | |||
320 | } int_funcs[] = { | 325 | } int_funcs[] = { |
321 | {"assert", luaI_assert}, | 326 | {"assert", luaI_assert}, |
322 | {"call", luaI_call}, | 327 | {"call", luaI_call}, |
328 | {"callgc", luaI_collectgarbage}, | ||
323 | {"dofile", lua_internaldofile}, | 329 | {"dofile", lua_internaldofile}, |
324 | {"dostring", lua_internaldostring}, | 330 | {"dostring", lua_internaldostring}, |
325 | {"error", luaI_error}, | 331 | {"error", luaI_error}, |