aboutsummaryrefslogtreecommitdiff
path: root/lua.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2004-11-18 17:53:49 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2004-11-18 17:53:49 -0200
commit9be5844713036f89483c8f47dfaa45a1d52eb70f (patch)
treed6466081fed22b0641f8543eebb1f9b11409d6db /lua.c
parent497f042fadb76bdca15fec27ea087a9995182005 (diff)
downloadlua-9be5844713036f89483c8f47dfaa45a1d52eb70f.tar.gz
lua-9be5844713036f89483c8f47dfaa45a1d52eb70f.tar.bz2
lua-9be5844713036f89483c8f47dfaa45a1d52eb70f.zip
first full implementation of new package system
Diffstat (limited to 'lua.c')
-rw-r--r--lua.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lua.c b/lua.c
index 88ad392e..5e4ca9fb 100644
--- a/lua.c
+++ b/lua.c
@@ -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
129static int dolibrary (lua_State *L, const char *name) { 129static 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 }