Hi Ali,

At 1241818438 time_t, Ali Polatel wrote:

Ah, I've played with this piece of code, that's sad it is replaced. :)

>      /* add Lua lib path (/usr/share/awesome/lib by default) */
> +    lua_getglobal(L, "package");
> +    if (LUA_TTABLE != lua_type(L, 1)) {
> +        warn("package is not a table");
> +        return;
> +    }
> +    lua_getfield(L, 1, "path");
> +    if (LUA_TSTRING != lua_type(L, 2)) {
> +        warn("package.path is not a string");
> +        lua_pop(L, 1);
> +        return;
> +    }
> +    lua_pushliteral(L, ";" AWESOME_LUA_LIB_PATH "/?.lua");
> +    lua_pushliteral(L, ";" AWESOME_LUA_LIB_PATH "/?/init.lua");
> +    lua_concat(L, 3); /* concatenate with package.path */
>      luaA_dostring(L, "package.path = package.path .. \";" 
> AWESOME_LUA_LIB_PATH  "/?.lua\"");
>      luaA_dostring(L, "package.path = package.path .. \";" 
> AWESOME_LUA_LIB_PATH  "/?/init.lua\"");

What's the point of letting the 2 luaA_dostring()?
You forget to remove?

Cheers,
-- 
Julien Danjou
// ᐰ <jul...@danjou.info>   http://julien.danjou.info
// 9A0D 5FD9 EB42 22F6 8974  C95C A462 B51E C2FE E5CD
// There is nothing under this line.

Attachment: signature.asc
Description: Digital signature

Reply via email to