diff options
author | Oisin Canty <o.canty@f5.com> | 2021-05-20 13:02:45 +0000 |
---|---|---|
committer | Oisin Canty <o.canty@f5.com> | 2021-05-20 13:02:45 +0000 |
commit | f60389a782470e31dc555ab864784b536f2544ca (patch) | |
tree | a153c74dc96eb51906956d7add8bfff729b547d3 /src/python/nxt_python.h | |
parent | 2f0cca2e2b48f3f96056bac14e216f1248f8d4a8 (diff) | |
download | unit-f60389a782470e31dc555ab864784b536f2544ca.tar.gz unit-f60389a782470e31dc555ab864784b536f2544ca.tar.bz2 |
Python: support for multiple targets.
Diffstat (limited to 'src/python/nxt_python.h')
-rw-r--r-- | src/python/nxt_python.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/python/nxt_python.h b/src/python/nxt_python.h index b581dd46..a5c1d9a6 100644 --- a/src/python/nxt_python.h +++ b/src/python/nxt_python.h @@ -37,13 +37,28 @@ #define NXT_HAVE_ASGI 1 #endif -extern PyObject *nxt_py_application; + +typedef struct { + PyObject *application; + nxt_bool_t asgi_legacy; +} nxt_python_target_t; + + +typedef struct { + nxt_int_t count; + nxt_python_target_t target[0]; +} nxt_python_targets_t; + + +extern nxt_python_targets_t *nxt_py_targets; + typedef struct { nxt_str_t string; PyObject **object_p; } nxt_python_string_t; + typedef struct { int (*ctx_data_alloc)(void **pdata); void (*ctx_data_free)(void *data); |