Subject: Re: Python extension commands in git - request for policy change

From: Tomas Carnecky <[email-masked]>
Date: Wed, 12 Dec 2012 00:53:55 +0000

On Wed, 12 Dec 2012 05:39:43 +0530, Sitaram Chamarty <[email-masked]> wrote:
> Does lua have os.putenv() yet?  The inability to even *set* an env var
> before calling something else was a killer for me when I last tried
> it.

If it doesn't, it would be trivial to add. It's a one-liner. It's been a while
since I used Lua, but it would be something like this:

    void L_putenv(lua_State *L) {
        putenv(lua_tostring(L, 1));
    }

and then somewhere during setup:

    lua_register(L, "putenv", L_putenv);