¿Is posible reuse lua_newuserdata() returned pointer?
The idea is not allocate a new userdatum every time for the same object and allow equality check (example) done by lua.
obj1 = c_api__foobar();
obj2 = c_api__foobar();
if obj1 == obj2 then
print("equal")
else
print("they are supposed to be equal")
end
well look is not possible, attemping to reuse the pointer will throw something like
calling 'c_api__foobar' on bad self (FOOBAR expected, found FOOBAR)error.tested in lua 5.4