diff options
-rw-r--r-- | ltests.c | 4 | ||||
-rw-r--r-- | ltests.h | 8 |
2 files changed, 11 insertions, 1 deletions
@@ -309,6 +309,10 @@ static void printobj (global_State *g, GCObject *o) { | |||
309 | } | 309 | } |
310 | 310 | ||
311 | 311 | ||
312 | void lua_printobj (lua_State *L, struct GCObject *o) { | ||
313 | printobj(G(L), o); | ||
314 | } | ||
315 | |||
312 | static int testobjref (global_State *g, GCObject *f, GCObject *t) { | 316 | static int testobjref (global_State *g, GCObject *f, GCObject *t) { |
313 | int r1 = testobjref1(g, f, t); | 317 | int r1 = testobjref1(g, f, t); |
314 | if (!r1) { | 318 | if (!r1) { |
@@ -72,7 +72,13 @@ extern void *l_Trick; | |||
72 | /* | 72 | /* |
73 | ** Function to traverse and check all memory used by Lua | 73 | ** Function to traverse and check all memory used by Lua |
74 | */ | 74 | */ |
75 | int lua_checkmemory (lua_State *L); | 75 | LUAI_FUNC int lua_checkmemory (lua_State *L); |
76 | |||
77 | /* | ||
78 | ** Function to print an object GC-friendly | ||
79 | */ | ||
80 | struct GCObject; | ||
81 | LUAI_FUNC void lua_printobj (lua_State *L, struct GCObject *o); | ||
76 | 82 | ||
77 | 83 | ||
78 | /* test for lock/unlock */ | 84 | /* test for lock/unlock */ |