summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_python_wsgi.c
diff options
context:
space:
mode:
authorTiago Natel de Moura <t.nateldemoura@f5.com>2020-05-28 14:57:41 +0100
committerTiago Natel de Moura <t.nateldemoura@f5.com>2020-05-28 14:57:41 +0100
commite2b53e16c60ba1e3bbbe59172c184e97f889326b (patch)
treef2bda4ea966657fc52189d154e1d6afcb767973f /src/nxt_python_wsgi.c
parente9e5ddd5a5d9ce99768833137eac2551a710becf (diff)
downloadunit-e2b53e16c60ba1e3bbbe59172c184e97f889326b.tar.gz
unit-e2b53e16c60ba1e3bbbe59172c184e97f889326b.tar.bz2
Added "rootfs" feature.
Diffstat (limited to 'src/nxt_python_wsgi.c')
-rw-r--r--src/nxt_python_wsgi.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/nxt_python_wsgi.c b/src/nxt_python_wsgi.c
index 089d15c0..b9033a75 100644
--- a/src/nxt_python_wsgi.c
+++ b/src/nxt_python_wsgi.c
@@ -18,6 +18,7 @@
#include <nxt_unit_field.h>
#include <nxt_unit_request.h>
#include <nxt_unit_response.h>
+#include <nxt_python_mounts.h>
/*
* According to "PEP 3333 / A Note On String Types"
@@ -38,11 +39,17 @@
*/
+#define _NXT_PYTHON_MOUNTS(major, minor) \
+ nxt_python ## major ## minor ## _mounts
+
+#define NXT_PYTHON_MOUNTS(major, minor) _NXT_PYTHON_MOUNTS(major, minor)
+
#if PY_MAJOR_VERSION == 3
#define NXT_PYTHON_BYTES_TYPE "bytestring"
#define PyString_FromStringAndSize(str, size) \
PyUnicode_DecodeLatin1((str), (size), "strict")
+
#else
#define NXT_PYTHON_BYTES_TYPE "string"
@@ -116,6 +123,8 @@ NXT_EXPORT nxt_app_module_t nxt_app_module = {
compat,
nxt_string("python"),
PY_VERSION,
+ NXT_PYTHON_MOUNTS(PY_MAJOR_VERSION, PY_MINOR_VERSION),
+ nxt_nitems(NXT_PYTHON_MOUNTS(PY_MAJOR_VERSION, PY_MINOR_VERSION)),
NULL,
nxt_python_start,
};