better quotes for strings in error messages

This commit is contained in:
Roberto Ierusalimschy
2005-05-16 18:19:00 -03:00
parent da32450c3d
commit c2bb9abcec
16 changed files with 85 additions and 78 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: ldblib.c,v 1.95 2005/05/05 20:47:02 roberto Exp roberto $
** $Id: ldblib.c,v 1.96 2005/05/16 18:45:15 roberto Exp roberto $
** Interface from Lua to its debug API
** See Copyright Notice in lua.h
*/
@@ -48,7 +48,8 @@ static int db_setfenv (lua_State *L) {
luaL_checktype(L, 2, LUA_TTABLE);
lua_settop(L, 2);
if (lua_setfenv(L, 1) == 0)
luaL_error(L, "`setfenv' cannot change environment of given object");
luaL_error(L, LUA_SM " cannot change environment of given object",
"setfenv");
return 1;
}
@@ -347,7 +348,7 @@ static int db_errorfb (lua_State *L) {
if (ar.currentline > 0)
lua_pushfstring(L, "%d:", ar.currentline);
if (*ar.namewhat != '\0') /* is there a name? */
lua_pushfstring(L, " in function `%s'", ar.name);
lua_pushfstring(L, " in function " LUA_SM, ar.name);
else {
if (*ar.what == 'm') /* main? */
lua_pushfstring(L, " in main chunk");