summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2012-08-16 14:32:20 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2012-08-16 14:32:20 -0300
commitc1a2a646c81000b03a243cbdeba9c4bd6dd7b474 (patch)
tree3156a63335f8aa349f0b92a90c8d12a452c3fc14
parent53480f1163a65cc683b00663e2fa4883746ce7fb (diff)
downloadlua-github-c1a2a646c81000b03a243cbdeba9c4bd6dd7b474.tar.gz
details (no need to use lua_pushfstring for plain strings)
-rw-r--r--lauxlib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lauxlib.c b/lauxlib.c
index 5b1ce3d4..476abc80 100644
--- a/lauxlib.c
+++ b/lauxlib.c
@@ -1,5 +1,5 @@
/*
-** $Id: lauxlib.c,v 1.243 2012/04/20 17:05:17 roberto Exp roberto $
+** $Id: lauxlib.c,v 1.244 2012/05/31 20:28:45 roberto Exp roberto $
** Auxiliary functions for building Lua libraries
** See Copyright Notice in lua.h
*/
@@ -84,7 +84,7 @@ static void pushfuncname (lua_State *L, lua_Debug *ar) {
if (*ar->namewhat != '\0') /* is there a name? */
lua_pushfstring(L, "function " LUA_QS, ar->name);
else if (*ar->what == 'm') /* main? */
- lua_pushfstring(L, "main chunk");
+ lua_pushliteral(L, "main chunk");
else if (*ar->what == 'C') {
if (pushglobalfuncname(L, ar)) {
lua_pushfstring(L, "function " LUA_QS, lua_tostring(L, -1));
@@ -214,7 +214,7 @@ LUALIB_API int luaL_fileresult (lua_State *L, int stat, const char *fname) {
if (fname)
lua_pushfstring(L, "%s: %s", fname, strerror(en));
else
- lua_pushfstring(L, "%s", strerror(en));
+ lua_pushstring(L, strerror(en));
lua_pushinteger(L, en);
return 3;
}