Add a kore_python_preinit() hook.

This is called before the python initialization is completed
and allows developers to inject their own built-in methods.
This commit is contained in:
Joris Vink 2018-11-12 09:01:05 +01:00
parent 3925ba60ad
commit 966eaf8f7a
2 changed files with 6 additions and 3 deletions

View File

@ -24,6 +24,7 @@
#include <Python.h>
void kore_python_init(void);
void kore_python_preinit(void);
void kore_python_cleanup(void);
void kore_python_coro_run(void);
void kore_python_proc_reap(void);

View File

@ -177,9 +177,6 @@ main(int argc, char *argv[])
LIST_INIT(&listeners);
kore_log_init();
#if defined(KORE_USE_PYTHON)
kore_python_init();
#endif
#if !defined(KORE_NO_HTTP)
http_parent_init();
kore_auth_init();
@ -195,6 +192,11 @@ main(int argc, char *argv[])
usage();
#endif
kore_module_load(NULL, NULL, KORE_MODULE_NATIVE);
#if defined(KORE_USE_PYTHON)
kore_python_init();
#endif
kore_parse_config();
#if defined(KORE_SINGLE_BINARY)