C++ register function to lua