From c67603fafba7f982e92eb870ff4da6c6433c2a85 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 21 Feb 2018 10:48:44 -0300 Subject: using new 'lua_newuserdatauv' instead of 'lua_newuserdata' --- lauxlib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lauxlib.c') diff --git a/lauxlib.c b/lauxlib.c index 09d89d80..febd3eb1 100644 --- a/lauxlib.c +++ b/lauxlib.c @@ -1,5 +1,5 @@ /* -** $Id: lauxlib.c,v 1.291 2017/06/27 18:32:49 roberto Exp roberto $ +** $Id: lauxlib.c,v 1.292 2018/01/29 19:13:27 roberto Exp roberto $ ** Auxiliary functions for building Lua libraries ** See Copyright Notice in lua.h */ @@ -480,7 +480,7 @@ static int boxgc (lua_State *L) { static void *newbox (lua_State *L, size_t newsize) { - UBox *box = (UBox *)lua_newuserdata(L, sizeof(UBox)); + UBox *box = (UBox *)lua_newuserdatauv(L, sizeof(UBox), 0); box->box = NULL; box->bsize = 0; if (luaL_newmetatable(L, "_UBOX*")) { /* creating metatable? */ -- cgit v1.2.3-55-g6feb