mirror of
https://github.com/lua/lua
synced 2024-11-30 00:23:24 +03:00
added "\n" at the end of 'package.config' (so that the string
is a sequence of complete lines)
This commit is contained in:
parent
9423e22aa3
commit
5cdec7d124
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: loadlib.c,v 1.61 2008/08/06 13:38:32 roberto Exp roberto $
|
** $Id: loadlib.c,v 1.62 2009/03/26 22:25:05 roberto Exp roberto $
|
||||||
** Dynamic library loader for Lua
|
** Dynamic library loader for Lua
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
**
|
**
|
||||||
@ -669,7 +669,7 @@ LUALIB_API int luaopen_package (lua_State *L) {
|
|||||||
setpath(L, "cpath", LUA_CPATH, LUA_CPATH_DEFAULT); /* set field `cpath' */
|
setpath(L, "cpath", LUA_CPATH, LUA_CPATH_DEFAULT); /* set field `cpath' */
|
||||||
/* store config information */
|
/* store config information */
|
||||||
lua_pushliteral(L, LUA_DIRSEP "\n" LUA_PATHSEP "\n" LUA_PATH_MARK "\n"
|
lua_pushliteral(L, LUA_DIRSEP "\n" LUA_PATHSEP "\n" LUA_PATH_MARK "\n"
|
||||||
LUA_EXECDIR "\n" LUA_IGMARK);
|
LUA_EXECDIR "\n" LUA_IGMARK "\n");
|
||||||
lua_setfield(L, -2, "config");
|
lua_setfield(L, -2, "config");
|
||||||
/* set field `loaded' */
|
/* set field `loaded' */
|
||||||
luaL_findtable(L, LUA_REGISTRYINDEX, "_LOADED", 2);
|
luaL_findtable(L, LUA_REGISTRYINDEX, "_LOADED", 2);
|
||||||
|
Loading…
Reference in New Issue
Block a user