aboutsummaryrefslogtreecommitdiff
path: root/liolib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2003-10-10 10:29:28 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2003-10-10 10:29:28 -0300
commit10de467c794a536902755c236933623767bb452e (patch)
treebc0577eb71a887170abd07d8b7f52eade4518175 /liolib.c
parent533737f26e3f8036d7978e09427ea5ff75aec9df (diff)
downloadlua-10de467c794a536902755c236933623767bb452e.tar.gz
lua-10de467c794a536902755c236933623767bb452e.tar.bz2
lua-10de467c794a536902755c236933623767bb452e.zip
new function `lua_createtable'
Diffstat (limited to 'liolib.c')
-rw-r--r--liolib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/liolib.c b/liolib.c
index 3846360a..a2e22c4d 100644
--- a/liolib.c
+++ b/liolib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: liolib.c,v 2.47 2003/10/07 20:13:41 roberto Exp roberto $ 2** $Id: liolib.c,v 2.48 2003/10/10 12:57:55 roberto Exp roberto $
3** Standard I/O (and system) library 3** Standard I/O (and system) library
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -628,7 +628,7 @@ static int io_date (lua_State *L) {
628 if (stm == NULL) /* invalid date? */ 628 if (stm == NULL) /* invalid date? */
629 lua_pushnil(L); 629 lua_pushnil(L);
630 else if (strcmp(s, "*t") == 0) { 630 else if (strcmp(s, "*t") == 0) {
631 lua_newtable(L); 631 lua_createtable(L, 0, 9); /* 9 = number of fields */
632 setfield(L, "sec", stm->tm_sec); 632 setfield(L, "sec", stm->tm_sec);
633 setfield(L, "min", stm->tm_min); 633 setfield(L, "min", stm->tm_min);
634 setfield(L, "hour", stm->tm_hour); 634 setfield(L, "hour", stm->tm_hour);