daemon: init export core in the daemon and share it with modules

Also, use a context property to control whether to enable this core
or not and enable it only in the daemon
This commit is contained in:
George Kiagiadakis
2021-04-22 15:07:47 +03:00
parent b46587393c
commit af9b9a84f0
3 changed files with 36 additions and 16 deletions

View File

@@ -35,7 +35,7 @@ get_wp_export_core (lua_State *L)
lua_gettable (L, LUA_REGISTRYINDEX);
core = lua_touserdata (L, -1);
lua_pop (L, 1);
return core;
return core ? core : get_wp_core(L);
}
/* GLib */