diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-09-20 14:55:10 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-09-20 14:55:10 -0300 |
commit | d8f1cca16ea9a682127bb328c8bdfbfb4ded3412 (patch) | |
tree | a43ca86e36a0d27ccda6c4599988cc2c69b50e34 /ltests.c | |
parent | bf96d3fdd9ee477faa774734453c27535a36b16f (diff) | |
download | lua-d8f1cca16ea9a682127bb328c8bdfbfb4ded3412.tar.gz lua-d8f1cca16ea9a682127bb328c8bdfbfb4ded3412.tar.bz2 lua-d8f1cca16ea9a682127bb328c8bdfbfb4ded3412.zip |
new function 'lua_setallocf'
Diffstat (limited to 'ltests.c')
-rw-r--r-- | ltests.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltests.c,v 2.30 2005/08/26 17:36:32 roberto Exp roberto $ | 2 | ** $Id: ltests.c,v 2.31 2005/09/14 17:48:57 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 | */ |
@@ -1124,6 +1124,7 @@ int luaB_opentests (lua_State *L) { | |||
1124 | void *ud; | 1124 | void *ud; |
1125 | lua_assert(lua_getallocf(L, &ud) == debug_realloc); | 1125 | lua_assert(lua_getallocf(L, &ud) == debug_realloc); |
1126 | lua_assert(ud == cast(void *, &memcontrol)); | 1126 | lua_assert(ud == cast(void *, &memcontrol)); |
1127 | lua_setallocf(L, lua_getallocf(L, NULL), ud); | ||
1127 | lua_state = L; /* keep first state to be opened */ | 1128 | lua_state = L; /* keep first state to be opened */ |
1128 | luaL_register(L, "T", tests_funcs); | 1129 | luaL_register(L, "T", tests_funcs); |
1129 | return 0; | 1130 | return 0; |