From 9be5844713036f89483c8f47dfaa45a1d52eb70f Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 18 Nov 2004 17:53:49 -0200 Subject: first full implementation of new package system --- lua.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lua.c') diff --git a/lua.c b/lua.c index 88ad392e..5e4ca9fb 100644 --- a/lua.c +++ b/lua.c @@ -1,5 +1,5 @@ /* -** $Id: lua.c,v 1.131 2004/08/26 14:19:55 roberto Exp roberto $ +** $Id: lua.c,v 1.132 2004/08/30 18:35:14 roberto Exp roberto $ ** Lua stand-alone interpreter ** See Copyright Notice in lua.h */ @@ -127,9 +127,9 @@ static int dostring (lua_State *L, const char *s, const char *name) { static int dolibrary (lua_State *L, const char *name) { - lua_getfield(L, LUA_GLOBALSINDEX, "_PATH"); + luaL_getfield(L, LUA_GLOBALSINDEX, "package.path"); if (!lua_isstring(L, -1)) { - l_message(progname, "global _PATH must be a string"); + l_message(progname, "`package.path' must be a string"); return 1; } name = luaL_searchpath(L, name, lua_tostring(L, -1)); @@ -295,7 +295,7 @@ static int handle_argv (lua_State *L, char *argv[], int *interactive) { print_usage(); return 1; } - if (dostring(L, chunk, "=") != 0) + if (dostring(L, chunk, "=(command line)") != 0) return 1; break; } -- cgit v1.2.3-55-g6feb