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' --- liolib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'liolib.c') diff --git a/liolib.c b/liolib.c index f3c914d7..7dc1dab9 100644 --- a/liolib.c +++ b/liolib.c @@ -1,5 +1,5 @@ /* -** $Id: liolib.c,v 2.153 2017/11/16 13:19:06 roberto Exp roberto $ +** $Id: liolib.c,v 2.154 2017/11/16 16:28:36 roberto Exp roberto $ ** Standard I/O (and system) library ** See Copyright Notice in lua.h */ @@ -186,7 +186,7 @@ static FILE *tofile (lua_State *L) { ** handle is in a consistent state. */ static LStream *newprefile (lua_State *L) { - LStream *p = (LStream *)lua_newuserdata(L, sizeof(LStream)); + LStream *p = (LStream *)lua_newuserdatauv(L, sizeof(LStream), 0); p->closef = NULL; /* mark file handle as 'closed' */ luaL_setmetatable(L, LUA_FILEHANDLE); return p; -- cgit v1.2.3-55-g6feb