mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-08-09 03:10:27 +00:00
Update to allow using MapContentType from redbean REPL
This commit is contained in:
parent
2849382d9c
commit
077f4d1bd2
1 changed files with 6 additions and 5 deletions
|
@ -5171,6 +5171,12 @@ static void LuaInit(void) {
|
||||||
#ifndef STATIC
|
#ifndef STATIC
|
||||||
lua_State *L = GL;
|
lua_State *L = GL;
|
||||||
LuaSetArgv(L);
|
LuaSetArgv(L);
|
||||||
|
|
||||||
|
// create a list of custom content types
|
||||||
|
lua_pushlightuserdata(L, (void *)&ctIdx); // push address as unique key
|
||||||
|
lua_newtable(L);
|
||||||
|
lua_settable(L, LUA_REGISTRYINDEX); // registry[&ctIdx] = {}
|
||||||
|
|
||||||
if (interpretermode) {
|
if (interpretermode) {
|
||||||
int rc = LuaInterpreter(L);
|
int rc = LuaInterpreter(L);
|
||||||
LuaDestroy();
|
LuaDestroy();
|
||||||
|
@ -5180,11 +5186,6 @@ static void LuaInit(void) {
|
||||||
}
|
}
|
||||||
exit(rc);
|
exit(rc);
|
||||||
}
|
}
|
||||||
// create a list of custom content types
|
|
||||||
lua_pushlightuserdata(L, (void *)&ctIdx); // push address as unique key
|
|
||||||
lua_newtable(L);
|
|
||||||
lua_settable(L, LUA_REGISTRYINDEX); // registry[&ctIdx] = {}
|
|
||||||
|
|
||||||
if (LuaRunAsset("/.init.lua", true)) {
|
if (LuaRunAsset("/.init.lua", true)) {
|
||||||
hasonhttprequest = IsHookDefined("OnHttpRequest");
|
hasonhttprequest = IsHookDefined("OnHttpRequest");
|
||||||
hasonclientconnection = IsHookDefined("OnClientConnection");
|
hasonclientconnection = IsHookDefined("OnClientConnection");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue