diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-10-17 13:28:21 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-10-17 13:28:21 -0300 |
commit | f97c64d7bf4c0f373711795d8faba0e8cd206761 (patch) | |
tree | 99c9e25132b2ef193dc417873e8f44e5c0ea8738 /lauxlib.c | |
parent | ea3155e380080095a6f8c63297f0505789cf08b7 (diff) | |
download | lua-f97c64d7bf4c0f373711795d8faba0e8cd206761.tar.gz lua-f97c64d7bf4c0f373711795d8faba0e8cd206761.tar.bz2 lua-f97c64d7bf4c0f373711795d8faba0e8cd206761.zip |
macros 'LUA_QL'/'LUA_QL' deprecated
Diffstat (limited to 'lauxlib.c')
-rw-r--r-- | lauxlib.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lauxlib.c,v 1.267 2014/07/19 14:37:09 roberto Exp roberto $ | 2 | ** $Id: lauxlib.c,v 1.268 2014/09/22 06:42:15 roberto Exp roberto $ |
3 | ** Auxiliary functions for building Lua libraries | 3 | ** Auxiliary functions for building Lua libraries |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -82,12 +82,12 @@ static int pushglobalfuncname (lua_State *L, lua_Debug *ar) { | |||
82 | 82 | ||
83 | static void pushfuncname (lua_State *L, lua_Debug *ar) { | 83 | static void pushfuncname (lua_State *L, lua_Debug *ar) { |
84 | if (*ar->namewhat != '\0') /* is there a name? */ | 84 | if (*ar->namewhat != '\0') /* is there a name? */ |
85 | lua_pushfstring(L, "function " LUA_QS, ar->name); | 85 | lua_pushfstring(L, "function '%s'", ar->name); |
86 | else if (*ar->what == 'm') /* main? */ | 86 | else if (*ar->what == 'm') /* main? */ |
87 | lua_pushliteral(L, "main chunk"); | 87 | lua_pushliteral(L, "main chunk"); |
88 | else if (*ar->what == 'C') { | 88 | else if (*ar->what == 'C') { |
89 | if (pushglobalfuncname(L, ar)) { | 89 | if (pushglobalfuncname(L, ar)) { |
90 | lua_pushfstring(L, "function " LUA_QS, lua_tostring(L, -1)); | 90 | lua_pushfstring(L, "function '%s'", lua_tostring(L, -1)); |
91 | lua_remove(L, -2); /* remove name */ | 91 | lua_remove(L, -2); /* remove name */ |
92 | } | 92 | } |
93 | else | 93 | else |
@@ -158,12 +158,12 @@ LUALIB_API int luaL_argerror (lua_State *L, int arg, const char *extramsg) { | |||
158 | if (strcmp(ar.namewhat, "method") == 0) { | 158 | if (strcmp(ar.namewhat, "method") == 0) { |
159 | arg--; /* do not count `self' */ | 159 | arg--; /* do not count `self' */ |
160 | if (arg == 0) /* error is in the self argument itself? */ | 160 | if (arg == 0) /* error is in the self argument itself? */ |
161 | return luaL_error(L, "calling " LUA_QS " on bad self (%s)", | 161 | return luaL_error(L, "calling '%s' on bad self (%s)", |
162 | ar.name, extramsg); | 162 | ar.name, extramsg); |
163 | } | 163 | } |
164 | if (ar.name == NULL) | 164 | if (ar.name == NULL) |
165 | ar.name = (pushglobalfuncname(L, &ar)) ? lua_tostring(L, -1) : "?"; | 165 | ar.name = (pushglobalfuncname(L, &ar)) ? lua_tostring(L, -1) : "?"; |
166 | return luaL_error(L, "bad argument #%d to " LUA_QS " (%s)", | 166 | return luaL_error(L, "bad argument #%d to '%s' (%s)", |
167 | arg, ar.name, extramsg); | 167 | arg, ar.name, extramsg); |
168 | } | 168 | } |
169 | 169 | ||
@@ -335,7 +335,7 @@ LUALIB_API int luaL_checkoption (lua_State *L, int arg, const char *def, | |||
335 | if (strcmp(lst[i], name) == 0) | 335 | if (strcmp(lst[i], name) == 0) |
336 | return i; | 336 | return i; |
337 | return luaL_argerror(L, arg, | 337 | return luaL_argerror(L, arg, |
338 | lua_pushfstring(L, "invalid option " LUA_QS, name)); | 338 | lua_pushfstring(L, "invalid option '%s'", name)); |
339 | } | 339 | } |
340 | 340 | ||
341 | 341 | ||
@@ -823,7 +823,7 @@ LUALIB_API void luaL_pushmodule (lua_State *L, const char *modname, | |||
823 | /* try global variable (and create one if it does not exist) */ | 823 | /* try global variable (and create one if it does not exist) */ |
824 | lua_pushglobaltable(L); | 824 | lua_pushglobaltable(L); |
825 | if (luaL_findtable(L, 0, modname, sizehint) != NULL) | 825 | if (luaL_findtable(L, 0, modname, sizehint) != NULL) |
826 | luaL_error(L, "name conflict for module " LUA_QS, modname); | 826 | luaL_error(L, "name conflict for module '%s'", modname); |
827 | lua_pushvalue(L, -1); | 827 | lua_pushvalue(L, -1); |
828 | lua_setfield(L, -3, modname); /* _LOADED[modname] = new table */ | 828 | lua_setfield(L, -3, modname); /* _LOADED[modname] = new table */ |
829 | } | 829 | } |