From 10de467c794a536902755c236933623767bb452e Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 10 Oct 2003 10:29:28 -0300 Subject: new function `lua_createtable' --- liolib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'liolib.c') diff --git a/liolib.c b/liolib.c index 3846360a..a2e22c4d 100644 --- a/liolib.c +++ b/liolib.c @@ -1,5 +1,5 @@ /* -** $Id: liolib.c,v 2.47 2003/10/07 20:13:41 roberto Exp roberto $ +** $Id: liolib.c,v 2.48 2003/10/10 12:57:55 roberto Exp roberto $ ** Standard I/O (and system) library ** See Copyright Notice in lua.h */ @@ -628,7 +628,7 @@ static int io_date (lua_State *L) { if (stm == NULL) /* invalid date? */ lua_pushnil(L); else if (strcmp(s, "*t") == 0) { - lua_newtable(L); + lua_createtable(L, 0, 9); /* 9 = number of fields */ setfield(L, "sec", stm->tm_sec); setfield(L, "min", stm->tm_min); setfield(L, "hour", stm->tm_hour); -- cgit v1.2.3-55-g6feb