aboutsummaryrefslogtreecommitdiff
path: root/lauxlib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2018-02-21 10:48:44 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2018-02-21 10:48:44 -0300
commitc67603fafba7f982e92eb870ff4da6c6433c2a85 (patch)
tree4f462d90c766a989e4a41d8bf62199554c7792ab /lauxlib.c
parent06865aa01d1a8bfcf9f2f4b5a71e37a2561eeea6 (diff)
downloadlua-c67603fafba7f982e92eb870ff4da6c6433c2a85.tar.gz
lua-c67603fafba7f982e92eb870ff4da6c6433c2a85.tar.bz2
lua-c67603fafba7f982e92eb870ff4da6c6433c2a85.zip
using new 'lua_newuserdatauv' instead of 'lua_newuserdata'
Diffstat (limited to 'lauxlib.c')
-rw-r--r--lauxlib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lauxlib.c b/lauxlib.c
index 09d89d80..febd3eb1 100644
--- a/lauxlib.c
+++ b/lauxlib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lauxlib.c,v 1.291 2017/06/27 18:32:49 roberto Exp roberto $ 2** $Id: lauxlib.c,v 1.292 2018/01/29 19:13:27 roberto Exp roberto $
3** Auxiliary functions for building Lua libraries 3** Auxiliary functions for building Lua libraries
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -480,7 +480,7 @@ static int boxgc (lua_State *L) {
480 480
481 481
482static void *newbox (lua_State *L, size_t newsize) { 482static void *newbox (lua_State *L, size_t newsize) {
483 UBox *box = (UBox *)lua_newuserdata(L, sizeof(UBox)); 483 UBox *box = (UBox *)lua_newuserdatauv(L, sizeof(UBox), 0);
484 box->box = NULL; 484 box->box = NULL;
485 box->bsize = 0; 485 box->bsize = 0;
486 if (luaL_newmetatable(L, "_UBOX*")) { /* creating metatable? */ 486 if (luaL_newmetatable(L, "_UBOX*")) { /* creating metatable? */