aboutsummaryrefslogtreecommitdiff
path: root/lauxlib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2005-05-17 16:49:15 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2005-05-17 16:49:15 -0300
commit67578ec51f1a3ec2c967f15d370067caf9e0b87b (patch)
treed77b292ddec33d7e6987bae808fa1db250ebd830 /lauxlib.c
parentc2bb9abceceef125554595e23b7cc18ad3555c7c (diff)
downloadlua-67578ec51f1a3ec2c967f15d370067caf9e0b87b.tar.gz
lua-67578ec51f1a3ec2c967f15d370067caf9e0b87b.tar.bz2
lua-67578ec51f1a3ec2c967f15d370067caf9e0b87b.zip
several small details
Diffstat (limited to 'lauxlib.c')
-rw-r--r--lauxlib.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lauxlib.c b/lauxlib.c
index 2aeeb84a..0c64f9e5 100644
--- a/lauxlib.c
+++ b/lauxlib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lauxlib.c,v 1.131 2005/05/16 19:21:11 roberto Exp roberto $ 2** $Id: lauxlib.c,v 1.132 2005/05/16 21:19:00 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*/
@@ -47,12 +47,12 @@ LUALIB_API int luaL_argerror (lua_State *L, int narg, const char *extramsg) {
47 if (strcmp(ar.namewhat, "method") == 0) { 47 if (strcmp(ar.namewhat, "method") == 0) {
48 narg--; /* do not count `self' */ 48 narg--; /* do not count `self' */
49 if (narg == 0) /* error is in the self argument itself? */ 49 if (narg == 0) /* error is in the self argument itself? */
50 return luaL_error(L, "calling " LUA_SM " on bad self (%s)", 50 return luaL_error(L, "calling " LUA_QS " on bad self (%s)",
51 ar.name, extramsg); 51 ar.name, extramsg);
52 } 52 }
53 if (ar.name == NULL) 53 if (ar.name == NULL)
54 ar.name = "?"; 54 ar.name = "?";
55 return luaL_error(L, "bad argument #%d to " LUA_SM " (%s)", 55 return luaL_error(L, "bad argument #%d to " LUA_QS " (%s)",
56 narg, ar.name, extramsg); 56 narg, ar.name, extramsg);
57} 57}
58 58
@@ -245,7 +245,7 @@ LUALIB_API void luaL_openlib (lua_State *L, const char *libname,
245 luaL_setfield(L, LUA_GLOBALSINDEX, libname); 245 luaL_setfield(L, LUA_GLOBALSINDEX, libname);
246 } 246 }
247 else if (!lua_istable(L, -1)) 247 else if (!lua_istable(L, -1))
248 luaL_error(L, "name conflict for library " LUA_SM, libname); 248 luaL_error(L, "name conflict for library " LUA_QS, libname);
249 lua_getfield(L, LUA_REGISTRYINDEX, "_LOADED"); 249 lua_getfield(L, LUA_REGISTRYINDEX, "_LOADED");
250 lua_pushvalue(L, -2); 250 lua_pushvalue(L, -2);
251 lua_setfield(L, -2, libname); /* _LOADED[modname] = new table */ 251 lua_setfield(L, -2, libname); /* _LOADED[modname] = new table */
@@ -366,7 +366,7 @@ LUALIB_API const char *luaL_searchpath (lua_State *L, const char *name,
366 for (;;) { 366 for (;;) {
367 const char *fname; 367 const char *fname;
368 if ((p = pushnexttemplate(L, p)) == NULL) { 368 if ((p = pushnexttemplate(L, p)) == NULL) {
369 lua_pushfstring(L, "no readable " LUA_SM " in path " LUA_SM "", 369 lua_pushfstring(L, "no readable " LUA_QS " in path " LUA_QS "",
370 name, path); 370 name, path);
371 return NULL; 371 return NULL;
372 } 372 }