diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2003-10-20 10:25:23 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2003-10-20 10:25:23 -0200 |
commit | 03bab90303270534ba6a415b5379d4659757082d (patch) | |
tree | 06ca47214b7503990508e6814fa73e00638f81ff /ltests.c | |
parent | 8502331f69a3a13bce0b2afca36dd3f607eb3696 (diff) | |
download | lua-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.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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 | ||
838 | int luaB_opentests (lua_State *L) { | 838 | int 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 */ |