diff options
Diffstat (limited to 'lbaselib.c')
| -rw-r--r-- | lbaselib.c | 8 |
1 files changed, 5 insertions, 3 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lbaselib.c,v 1.173 2005/03/28 17:17:53 roberto Exp roberto $ | 2 | ** $Id: lbaselib.c,v 1.174 2005/05/16 19:21:11 roberto Exp roberto $ |
| 3 | ** Basic library | 3 | ** Basic library |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -39,7 +39,8 @@ static int luaB_print (lua_State *L) { | |||
| 39 | lua_call(L, 1, 1); | 39 | lua_call(L, 1, 1); |
| 40 | s = lua_tostring(L, -1); /* get result */ | 40 | s = lua_tostring(L, -1); /* get result */ |
| 41 | if (s == NULL) | 41 | if (s == NULL) |
| 42 | return luaL_error(L, "`tostring' must return a string to `print'"); | 42 | return luaL_error(L, LUA_SM " must return a string to " LUA_SM, |
| 43 | "tostring", "print"); | ||
| 43 | if (i>1) fputs("\t", stdout); | 44 | if (i>1) fputs("\t", stdout); |
| 44 | fputs(s, stdout); | 45 | fputs(s, stdout); |
| 45 | lua_pop(L, 1); /* pop result */ | 46 | lua_pop(L, 1); /* pop result */ |
| @@ -148,7 +149,8 @@ static int luaB_setfenv (lua_State *L) { | |||
| 148 | return 0; | 149 | return 0; |
| 149 | } | 150 | } |
| 150 | else if (lua_iscfunction(L, -2) || lua_setfenv(L, -2) == 0) | 151 | else if (lua_iscfunction(L, -2) || lua_setfenv(L, -2) == 0) |
| 151 | luaL_error(L, "`setfenv' cannot change environment of given object"); | 152 | luaL_error(L, LUA_SM " cannot change environment of given object", |
| 153 | "setfenv"); | ||
| 152 | return 1; | 154 | return 1; |
| 153 | } | 155 | } |
| 154 | 156 | ||
