From 03bab90303270534ba6a415b5379d4659757082d Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 20 Oct 2003 10:25:23 -0200 Subject: new function `lua_getallocf' to retrieve allocation function and data --- ltests.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ltests.c') diff --git a/ltests.c b/ltests.c index 05d2ab16..4d8a60f4 100644 --- a/ltests.c +++ b/ltests.c @@ -1,5 +1,5 @@ /* -** $Id: ltests.c,v 1.165 2003/10/07 20:13:41 roberto Exp roberto $ +** $Id: ltests.c,v 1.166 2003/10/10 13:29:08 roberto Exp roberto $ ** Internal Module for Debugging of the Lua Implementation ** See Copyright Notice in lua.h */ @@ -836,6 +836,9 @@ static int l_panic (lua_State *L) { int luaB_opentests (lua_State *L) { + void *ud; + lua_assert(lua_getallocf(L, &ud) == debug_realloc); + lua_assert(ud == cast(void *, &memcontrol)); lua_atpanic(L, l_panic); lua_userstateopen(L); /* init lock */ lua_state = L; /* keep first state to be opened */ -- cgit v1.2.3-55-g6feb