Pass Type to luax_register_type by pointer instead of reference

Since the type is passed to va_start, and apparently that's undefined behaviour if it's a reference.

<Textmode> the best kind of behavior

--HG--
branch : dynamiccore2
This commit is contained in:
Bart van Strien
2016-11-14 21:51:47 +01:00
parent d967a755e5
commit 9f6aa716fa
54 changed files with 60 additions and 59 deletions
+1 -1
View File
@@ -147,7 +147,7 @@ static const luaL_Reg w_RandomGenerator_functions[] =
extern "C" int luaopen_randomgenerator(lua_State *L)
{
int n = luax_register_type(L, RandomGenerator::type, w_RandomGenerator_functions, nullptr);
int n = luax_register_type(L, &RandomGenerator::type, w_RandomGenerator_functions, nullptr);
luax_gettypemetatable(L, RandomGenerator::type);