From c86b9da02276652a22426b2a5a194ba1f070fcf4 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 19 Feb 2014 10:52:42 -0300 Subject: userdata can have any Lua value as uservalue --- ltests.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ltests.c') diff --git a/ltests.c b/ltests.c index 931fc1c8..65e2ad26 100644 --- a/ltests.c +++ b/ltests.c @@ -1,5 +1,5 @@ /* -** $Id: ltests.c,v 2.165 2014/02/15 13:12:01 roberto Exp roberto $ +** $Id: ltests.c,v 2.166 2014/02/18 13:46:26 roberto Exp roberto $ ** Internal Module for Debugging of the Lua Implementation ** See Copyright Notice in lua.h */ @@ -322,8 +322,11 @@ static void checkobject (global_State *g, GCObject *o, int maybedead) { lua_assert(g->gcstate != GCSpause || iswhite(o)); switch (gch(o)->tt) { case LUA_TUSERDATA: { + TValue uservalue; Table *mt = gco2u(o)->metatable; if (mt) checkobjref(g, o, mt); + getuservalue(g->mainthread, rawgco2u(o), &uservalue); + checkobjref(g, o, &uservalue); break; } case LUA_TTABLE: { -- cgit v1.2.3-55-g6feb