| 137 | static lua_State *luapat; /* instance for file pattern matching */ |
| 138 | |
| 139 | void |
| 140 | l_nhcore_init(void) |
| 141 | { |
| 142 | nhl_sandbox_info sbi = { NHL_SB_SAFE, 1 * 1024 * 1024, 0, |
| 143 | 1 * 1024 * 1024 }; |
| 144 | |
| 145 | if ((gl.luacore = nhl_init(&sbi)) != 0) { |
| 146 | if (!nhl_loadlua(gl.luacore, "nhcore.lua")) { |
| 147 | gl.luacore = (lua_State *) 0; |
| 148 | } else { |
| 149 | int i; |
| 150 | |
| 151 | for (i = 0; i < NUM_NHCORE_CALLS; i++) |
| 152 | nhcore_call_available[i] = TRUE; |
| 153 | } |
| 154 | } else |
| 155 | impossible("l_nhcore_init failed"); |
| 156 | } |
| 157 | |
| 158 | void |
| 159 | l_nhcore_done(void) |
no test coverage detected