lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> In Lua-5.2.1 source, lapi.c, function 'lua_setmetatable', lines 824-826: in
> the 'LUA_TTABLE' case, code indentation, logic and comparison with the
> 'LUA_TUSERDATA' case all suggest that both 'luaC_objbarrierback' and
> 'luaC_checkfinalizer' should be in the scope of the conditional on 'mt'
> while in fact only the first call is. Did a pair of braces go astray?

Thanks for the feedback.

The code certainly is wrong, we will correct it. But that error does
not cause any runtime bug. When 'mt' is NULL, the test 'gfasttm(g, mt,
TM_GC) == NULL' inside 'luaC_checkfinalizer" is always true, so that
function returns right away.

-- Roberto