aboutsummaryrefslogtreecommitdiff
path: root/ltests.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-02-19 10:52:42 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-02-19 10:52:42 -0300
commitc86b9da02276652a22426b2a5a194ba1f070fcf4 (patch)
treea910fbba8cdae6ad2344205b6547e154b6a12dff /ltests.c
parenta4c6dcf999ddea865e295ea34926a838a1f97b61 (diff)
downloadlua-c86b9da02276652a22426b2a5a194ba1f070fcf4.tar.gz
lua-c86b9da02276652a22426b2a5a194ba1f070fcf4.tar.bz2
lua-c86b9da02276652a22426b2a5a194ba1f070fcf4.zip
userdata can have any Lua value as uservalue
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 931fc1c8..65e2ad26 100644
--- a/ltests.c
+++ b/ltests.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltests.c,v 2.165 2014/02/15 13:12:01 roberto Exp roberto $ 2** $Id: ltests.c,v 2.166 2014/02/18 13:46:26 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*/
@@ -322,8 +322,11 @@ static void checkobject (global_State *g, GCObject *o, int maybedead) {
322 lua_assert(g->gcstate != GCSpause || iswhite(o)); 322 lua_assert(g->gcstate != GCSpause || iswhite(o));
323 switch (gch(o)->tt) { 323 switch (gch(o)->tt) {
324 case LUA_TUSERDATA: { 324 case LUA_TUSERDATA: {
325 TValue uservalue;
325 Table *mt = gco2u(o)->metatable; 326 Table *mt = gco2u(o)->metatable;
326 if (mt) checkobjref(g, o, mt); 327 if (mt) checkobjref(g, o, mt);
328 getuservalue(g->mainthread, rawgco2u(o), &uservalue);
329 checkobjref(g, o, &uservalue);
327 break; 330 break;
328 } 331 }
329 case LUA_TTABLE: { 332 case LUA_TTABLE: {