kore

a fork of the worlds most advanced web framework
Log | Files | Refs | README | LICENSE

commit 966eaf8f7aff4869d1ff39408a368f6ac08aeeaa
parent 3925ba60adf567ea044074a02dfffd652426c5f9
Author: Joris Vink <joris@coders.se>
Date:   Mon, 12 Nov 2018 09:01:05 +0100

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.

Diffstat:
Minclude/kore/python_api.h | 1+
Msrc/kore.c | 8+++++---
2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/include/kore/python_api.h b/include/kore/python_api.h @@ -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); diff --git a/src/kore.c b/src/kore.c @@ -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)