diff options
| author | Andrei Belov <defan@nginx.com> | 2021-08-19 18:17:12 +0300 |
|---|---|---|
| committer | Andrei Belov <defan@nginx.com> | 2021-08-19 18:17:12 +0300 |
| commit | db442f1be7e713e6a219621ff97a51046590dbd6 (patch) | |
| tree | 913734275bc890ec175e51fcb0f36b01a3c52c24 /src/python/nxt_python.c | |
| parent | a1d2ced6fc2317d36bc917c5d0ac339bc647dc34 (diff) | |
| parent | 13c0025dfa6e041563d0ad5dd81679b44522694c (diff) | |
| download | unit-db442f1be7e713e6a219621ff97a51046590dbd6.tar.gz unit-db442f1be7e713e6a219621ff97a51046590dbd6.tar.bz2 | |
Merged with the default branch.1.25.0-1
Diffstat (limited to 'src/python/nxt_python.c')
| -rw-r--r-- | src/python/nxt_python.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/python/nxt_python.c b/src/python/nxt_python.c index 588a147a..abb04194 100644 --- a/src/python/nxt_python.c +++ b/src/python/nxt_python.c @@ -264,7 +264,7 @@ nxt_python_start(nxt_task_t *task, nxt_process_data_t *data) goto fail; } - rc = nxt_py_proto.ctx_data_alloc(&python_init.ctx_data); + rc = nxt_py_proto.ctx_data_alloc(&python_init.ctx_data, 1); if (nxt_slow_path(rc != NXT_UNIT_OK)) { goto fail; } @@ -364,13 +364,13 @@ nxt_python_set_target(nxt_task_t *task, nxt_python_target_t *target, obj = PyDict_GetItemString(PyModule_GetDict(module), callable); if (nxt_slow_path(obj == NULL)) { nxt_alert(task, "Python failed to get \"%s\" from module \"%s\"", - callable, module); + callable, module_name); goto fail; } if (nxt_slow_path(PyCallable_Check(obj) == 0)) { nxt_alert(task, "\"%s\" in module \"%s\" is not a callable object", - callable, module); + callable, module_name); goto fail; } @@ -504,7 +504,7 @@ nxt_python_init_threads(nxt_python_app_conf_t *c) for (i = 0; i < c->threads - 1; i++) { ti = &nxt_py_threads[i]; - res = nxt_py_proto.ctx_data_alloc(&ti->ctx_data); + res = nxt_py_proto.ctx_data_alloc(&ti->ctx_data, 0); if (nxt_slow_path(res != NXT_UNIT_OK)) { return NXT_UNIT_ERROR; } |
