From d8f1cca16ea9a682127bb328c8bdfbfb4ded3412 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 20 Sep 2005 14:55:10 -0300 Subject: new function 'lua_setallocf' --- ltests.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ltests.c') diff --git a/ltests.c b/ltests.c index 7530b7f9..70a66ce0 100644 --- a/ltests.c +++ b/ltests.c @@ -1,5 +1,5 @@ /* -** $Id: ltests.c,v 2.30 2005/08/26 17:36:32 roberto Exp roberto $ +** $Id: ltests.c,v 2.31 2005/09/14 17:48:57 roberto Exp roberto $ ** Internal Module for Debugging of the Lua Implementation ** See Copyright Notice in lua.h */ @@ -1124,6 +1124,7 @@ int luaB_opentests (lua_State *L) { void *ud; lua_assert(lua_getallocf(L, &ud) == debug_realloc); lua_assert(ud == cast(void *, &memcontrol)); + lua_setallocf(L, lua_getallocf(L, NULL), ud); lua_state = L; /* keep first state to be opened */ luaL_register(L, "T", tests_funcs); return 0; -- cgit v1.2.3-55-g6feb