¿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