lua

A copy of the Lua development repository
Log | Files | Refs | README

commit d7d44b038dcdbd4b8f8261c6a9a02ec05c0ea0ec
parent 297512b34c2d16bb7827ef61bd7b14467bfa4ecf
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date:   Fri,  6 Mar 2015 16:08:43 -0300

detail (use 'lua_pushliteral' to push an empty string)

Diffstat:
Mliolib.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/liolib.c b/liolib.c @@ -1,5 +1,5 @@ /* -** $Id: liolib.c,v 2.141 2014/11/21 12:17:33 roberto Exp roberto $ +** $Id: liolib.c,v 2.142 2015/01/02 12:50:28 roberto Exp roberto $ ** Standard I/O (and system) library ** See Copyright Notice in lua.h */ @@ -457,7 +457,7 @@ static int read_number (lua_State *L, FILE *f) { static int test_eof (lua_State *L, FILE *f) { int c = getc(f); ungetc(c, f); /* no-op when c == EOF */ - lua_pushlstring(L, NULL, 0); + lua_pushliteral(L, ""); return (c != EOF); }