From f97c64d7bf4c0f373711795d8faba0e8cd206761 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 17 Oct 2014 13:28:21 -0300 Subject: macros 'LUA_QL'/'LUA_QL' deprecated --- lauxlib.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'lauxlib.c') diff --git a/lauxlib.c b/lauxlib.c index a6cf8fbb..c8a597e2 100644 --- a/lauxlib.c +++ b/lauxlib.c @@ -1,5 +1,5 @@ /* -** $Id: lauxlib.c,v 1.267 2014/07/19 14:37:09 roberto Exp roberto $ +** $Id: lauxlib.c,v 1.268 2014/09/22 06:42:15 roberto Exp roberto $ ** Auxiliary functions for building Lua libraries ** See Copyright Notice in lua.h */ @@ -82,12 +82,12 @@ static int pushglobalfuncname (lua_State *L, lua_Debug *ar) { 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); + lua_pushfstring(L, "function '%s'", ar->name); else if (*ar->what == 'm') /* main? */ lua_pushliteral(L, "main chunk"); else if (*ar->what == 'C') { if (pushglobalfuncname(L, ar)) { - lua_pushfstring(L, "function " LUA_QS, lua_tostring(L, -1)); + lua_pushfstring(L, "function '%s'", lua_tostring(L, -1)); lua_remove(L, -2); /* remove name */ } else @@ -158,12 +158,12 @@ LUALIB_API int luaL_argerror (lua_State *L, int arg, const char *extramsg) { if (strcmp(ar.namewhat, "method") == 0) { arg--; /* do not count `self' */ if (arg == 0) /* error is in the self argument itself? */ - return luaL_error(L, "calling " LUA_QS " on bad self (%s)", + return luaL_error(L, "calling '%s' on bad self (%s)", ar.name, extramsg); } if (ar.name == NULL) ar.name = (pushglobalfuncname(L, &ar)) ? lua_tostring(L, -1) : "?"; - return luaL_error(L, "bad argument #%d to " LUA_QS " (%s)", + return luaL_error(L, "bad argument #%d to '%s' (%s)", arg, ar.name, extramsg); } @@ -335,7 +335,7 @@ LUALIB_API int luaL_checkoption (lua_State *L, int arg, const char *def, if (strcmp(lst[i], name) == 0) return i; return luaL_argerror(L, arg, - lua_pushfstring(L, "invalid option " LUA_QS, name)); + lua_pushfstring(L, "invalid option '%s'", name)); } @@ -823,7 +823,7 @@ LUALIB_API void luaL_pushmodule (lua_State *L, const char *modname, /* try global variable (and create one if it does not exist) */ lua_pushglobaltable(L); if (luaL_findtable(L, 0, modname, sizehint) != NULL) - luaL_error(L, "name conflict for module " LUA_QS, modname); + luaL_error(L, "name conflict for module '%s'", modname); lua_pushvalue(L, -1); lua_setfield(L, -3, modname); /* _LOADED[modname] = new table */ } -- cgit v1.2.3-55-g6feb