** return registry.LUA_NOENV as a boolean */
| 626 | ** return registry.LUA_NOENV as a boolean |
| 627 | */ |
| 628 | static int noenv (lua_State *L) { |
| 629 | int b; |
| 630 | lua_getfield(L, LUA_REGISTRYINDEX, "LUA_NOENV"); |
| 631 | b = lua_toboolean(L, -1); |
| 632 | lua_pop(L, 1); /* remove value */ |
| 633 | return b; |
| 634 | } |
| 635 | |
| 636 | |
| 637 | static void setpath (lua_State *L, const char *fieldname, const char *envname1, |
no test coverage detected