summaryrefslogtreecommitdiff
path: root/ltests.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2003-10-20 10:25:23 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2003-10-20 10:25:23 -0200
commit03bab90303270534ba6a415b5379d4659757082d (patch)
tree06ca47214b7503990508e6814fa73e00638f81ff /ltests.c
parent8502331f69a3a13bce0b2afca36dd3f607eb3696 (diff)
downloadlua-03bab90303270534ba6a415b5379d4659757082d.tar.gz
lua-03bab90303270534ba6a415b5379d4659757082d.tar.bz2
lua-03bab90303270534ba6a415b5379d4659757082d.zip
new function `lua_getallocf' to retrieve allocation function and data
Diffstat (limited to 'ltests.c')
-rw-r--r--ltests.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ltests.c b/ltests.c
index 05d2ab16..4d8a60f4 100644
--- a/ltests.c
+++ b/ltests.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltests.c,v 1.165 2003/10/07 20:13:41 roberto Exp roberto $ 2** $Id: ltests.c,v 1.166 2003/10/10 13:29:08 roberto Exp roberto $
3** Internal Module for Debugging of the Lua Implementation 3** Internal Module for Debugging of the Lua Implementation
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -836,6 +836,9 @@ static int l_panic (lua_State *L) {
836 836
837 837
838int luaB_opentests (lua_State *L) { 838int luaB_opentests (lua_State *L) {
839 void *ud;
840 lua_assert(lua_getallocf(L, &ud) == debug_realloc);
841 lua_assert(ud == cast(void *, &memcontrol));
839 lua_atpanic(L, l_panic); 842 lua_atpanic(L, l_panic);
840 lua_userstateopen(L); /* init lock */ 843 lua_userstateopen(L); /* init lock */
841 lua_state = L; /* keep first state to be opened */ 844 lua_state = L; /* keep first state to be opened */