Re: Python extension commands in git - request for policy change
- From
- Tomas Carnecky <tomas.carnecky@gmail.com>
- Date
- Dec 12, 2012, 00:53 UTC
- Message-ID
- <1355273635-ner-4863@calvin>
- In-Reply-To
- <CAMK1S_hy8U0rVY=-u-QCqXjhn-6jwz5ofj_q_mbokVn8CGCMtw@mail.gmail.com>
On Wed, 12 Dec 2012 05:39:43 +0530, Sitaram Chamarty <sitaramc@gmail.com> 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);