new macro pushliteral

This commit is contained in:
Roberto Ierusalimschy
2001-01-10 14:58:11 -02:00
parent 595e449537
commit 4ff5545709
7 changed files with 21 additions and 19 deletions

4
ldo.c
View File

@@ -1,5 +1,5 @@
/*
** $Id: ldo.c,v 1.110 2000/11/24 17:39:56 roberto Exp roberto $
** $Id: ldo.c,v 1.111 2000/12/28 12:55:41 roberto Exp roberto $
** Stack and Call structure of Lua
** See Copyright Notice in lua.h
*/
@@ -274,7 +274,7 @@ static int parse_file (lua_State *L, const char *filename) {
f = freopen(filename, "rb", f); /* set binary mode */
if (f == NULL) return LUA_ERRFILE; /* unable to reopen file */
}
lua_pushstring(L, "@");
lua_pushliteral(L, "@");
lua_pushstring(L, (filename == NULL) ? "(stdin)" : filename);
lua_concat(L, 2);
filename = lua_tostring(L, -1); /* filename = '@'..filename */