lua-users home
lua-l archive

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


More on a bug in tolua++.

With above example code there should be two metatables,
one for A and one for B, each with a different __call
entry, but there is only ONE table for both classes!

You can test it with this code, copied into the
tolua_tv_open function:


lua_getglobal   (tolua_S, "A");    // tA
lua_getmetatable(tolua_S,  -1);    // tA mtA

lua_getglobal   (tolua_S, "B");    // tA mtA tB
lua_getmetatable(tolua_S,  -1);    // tA mtA tB mtB

int eq = lua_rawequal(tolua_S, -1, -3);


Peter