nxt_python.h (1680:7bd798408038) nxt_python.h (1681:542b5b8c0647)
1
2/*
3 * Copyright (C) NGINX, Inc.
4 */
5
6#ifndef _NXT_PYTHON_H_INCLUDED_
7#define _NXT_PYTHON_H_INCLUDED_
8

--- 30 unchanged lines hidden (view full) ---

39
40extern PyObject *nxt_py_application;
41
42typedef struct {
43 nxt_str_t string;
44 PyObject **object_p;
45} nxt_python_string_t;
46
1
2/*
3 * Copyright (C) NGINX, Inc.
4 */
5
6#ifndef _NXT_PYTHON_H_INCLUDED_
7#define _NXT_PYTHON_H_INCLUDED_
8

--- 30 unchanged lines hidden (view full) ---

39
40extern PyObject *nxt_py_application;
41
42typedef struct {
43 nxt_str_t string;
44 PyObject **object_p;
45} nxt_python_string_t;
46
47typedef struct {
48 int (*ctx_data_alloc)(void **pdata);
49 void (*ctx_data_free)(void *data);
50 int (*startup)(void *data);
51 int (*run)(nxt_unit_ctx_t *ctx);
52 int (*ready)(nxt_unit_ctx_t *ctx);
53 void (*done)(void);
54} nxt_python_proto_t;
47
55
48nxt_int_t nxt_python_init_strings(nxt_python_string_t *pstr);
56
57int nxt_python_init_strings(nxt_python_string_t *pstr);
49void nxt_python_done_strings(nxt_python_string_t *pstr);
50
51void nxt_python_print_exception(void);
52
58void nxt_python_done_strings(nxt_python_string_t *pstr);
59
60void nxt_python_print_exception(void);
61
53nxt_int_t nxt_python_wsgi_init(nxt_task_t *task, nxt_unit_init_t *init);
54int nxt_python_wsgi_run(nxt_unit_ctx_t *ctx);
55void nxt_python_wsgi_done(void);
62int nxt_python_wsgi_init(nxt_unit_init_t *init, nxt_python_proto_t *proto);
56
57int nxt_python_asgi_check(PyObject *obj);
63
64int nxt_python_asgi_check(PyObject *obj);
58nxt_int_t nxt_python_asgi_init(nxt_task_t *task, nxt_unit_init_t *init);
59nxt_int_t nxt_python_asgi_run(nxt_unit_ctx_t *ctx);
60void nxt_python_asgi_done(void);
65int nxt_python_asgi_init(nxt_unit_init_t *init, nxt_python_proto_t *proto);
61
62
63#endif /* _NXT_PYTHON_H_INCLUDED_ */
66
67
68#endif /* _NXT_PYTHON_H_INCLUDED_ */