diff options
Diffstat (limited to 'lua.c')
| -rw-r--r-- | lua.c | 8 |
1 files changed, 4 insertions, 4 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lua.c,v 1.131 2004/08/26 14:19:55 roberto Exp roberto $ | 2 | ** $Id: lua.c,v 1.132 2004/08/30 18:35:14 roberto Exp roberto $ |
| 3 | ** Lua stand-alone interpreter | 3 | ** Lua stand-alone interpreter |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -127,9 +127,9 @@ static int dostring (lua_State *L, const char *s, const char *name) { | |||
| 127 | 127 | ||
| 128 | 128 | ||
| 129 | static int dolibrary (lua_State *L, const char *name) { | 129 | static int dolibrary (lua_State *L, const char *name) { |
| 130 | lua_getfield(L, LUA_GLOBALSINDEX, "_PATH"); | 130 | luaL_getfield(L, LUA_GLOBALSINDEX, "package.path"); |
| 131 | if (!lua_isstring(L, -1)) { | 131 | if (!lua_isstring(L, -1)) { |
| 132 | l_message(progname, "global _PATH must be a string"); | 132 | l_message(progname, "`package.path' must be a string"); |
| 133 | return 1; | 133 | return 1; |
| 134 | } | 134 | } |
| 135 | name = luaL_searchpath(L, name, lua_tostring(L, -1)); | 135 | name = luaL_searchpath(L, name, lua_tostring(L, -1)); |
| @@ -295,7 +295,7 @@ static int handle_argv (lua_State *L, char *argv[], int *interactive) { | |||
| 295 | print_usage(); | 295 | print_usage(); |
| 296 | return 1; | 296 | return 1; |
| 297 | } | 297 | } |
| 298 | if (dostring(L, chunk, "=<command line>") != 0) | 298 | if (dostring(L, chunk, "=(command line)") != 0) |
| 299 | return 1; | 299 | return 1; |
| 300 | break; | 300 | break; |
| 301 | } | 301 | } |
