aboutsummaryrefslogtreecommitdiff
path: root/ldo.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-01-10 14:58:11 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-01-10 14:58:11 -0200
commit4ff55457095728b95cc5dcdbab0bca7255bd5387 (patch)
tree661c6a3b6143aa66f2171811a1c87493abb17fc8 /ldo.c
parent595e449537eb6ff17fa6c58742920a1a609fc5c5 (diff)
downloadlua-4ff55457095728b95cc5dcdbab0bca7255bd5387.tar.gz
lua-4ff55457095728b95cc5dcdbab0bca7255bd5387.tar.bz2
lua-4ff55457095728b95cc5dcdbab0bca7255bd5387.zip
new macro pushliteral
Diffstat (limited to 'ldo.c')
-rw-r--r--ldo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ldo.c b/ldo.c
index 01485165..eb6fd46e 100644
--- a/ldo.c
+++ b/ldo.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ldo.c,v 1.110 2000/11/24 17:39:56 roberto Exp roberto $ 2** $Id: ldo.c,v 1.111 2000/12/28 12:55:41 roberto Exp roberto $
3** Stack and Call structure of Lua 3** Stack and Call structure of Lua
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -274,7 +274,7 @@ static int parse_file (lua_State *L, const char *filename) {
274 f = freopen(filename, "rb", f); /* set binary mode */ 274 f = freopen(filename, "rb", f); /* set binary mode */
275 if (f == NULL) return LUA_ERRFILE; /* unable to reopen file */ 275 if (f == NULL) return LUA_ERRFILE; /* unable to reopen file */
276 } 276 }
277 lua_pushstring(L, "@"); 277 lua_pushliteral(L, "@");
278 lua_pushstring(L, (filename == NULL) ? "(stdin)" : filename); 278 lua_pushstring(L, (filename == NULL) ? "(stdin)" : filename);
279 lua_concat(L, 2); 279 lua_concat(L, 2);
280 filename = lua_tostring(L, -1); /* filename = '@'..filename */ 280 filename = lua_tostring(L, -1); /* filename = '@'..filename */