** Calls 'require(name)' and stores the result in a global variable ** with the given name. */
| 126 | ** with the given name. |
| 127 | */ |
| 128 | static int dolibrary(lua_State *L, const char *name) { |
| 129 | int status; |
| 130 | lua_getglobal(L, "require"); |
| 131 | lua_pushstring(L, name); |
| 132 | status = docall(L, 1, 1); /* call 'require(name)' */ |
| 133 | if (status == LUA_OK) |
| 134 | lua_setglobal(L, name); /* global[name] = require return */ |
| 135 | return report(L, status); |
| 136 | } |
| 137 | |
| 138 | /* |
| 139 | ** Push on the stack the contents of table 'arg' from 1 to #arg |
no test coverage detected