From bfdcbbcd76c7187022fe2d35675de0b1c92eeadf Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 29 Dec 2005 14:23:32 -0200 Subject: small optimizations (lua_newtable -> lua_createtable) --- lstrlib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lstrlib.c') diff --git a/lstrlib.c b/lstrlib.c index c5cb136d..6020978d 100644 --- a/lstrlib.c +++ b/lstrlib.c @@ -1,5 +1,5 @@ /* -** $Id: lstrlib.c,v 1.128 2005/12/15 18:53:34 roberto Exp roberto $ +** $Id: lstrlib.c,v 1.129 2005/12/21 12:59:43 roberto Exp roberto $ ** Standard library for string operations and pattern-matching ** See Copyright Notice in lua.h */ @@ -837,7 +837,7 @@ static const luaL_Reg strlib[] = { static void createmetatable (lua_State *L) { - lua_newtable(L); /* create metatable for strings */ + lua_createtable(L, 0, 1); /* create metatable for strings */ lua_pushliteral(L, ""); /* dummy string */ lua_pushvalue(L, -2); lua_setmetatable(L, -2); /* set string metatable */ -- cgit v1.2.3-55-g6feb