Lines Matching refs:ctx_data

209     nxt_py_asgi_ctx_data_t  *ctx_data;  in nxt_python_asgi_ctx_data_alloc()  local
211 ctx_data = nxt_unit_malloc(NULL, sizeof(nxt_py_asgi_ctx_data_t)); in nxt_python_asgi_ctx_data_alloc()
212 if (nxt_slow_path(ctx_data == NULL)) { in nxt_python_asgi_ctx_data_alloc()
217 memset(ctx_data, 0, sizeof(nxt_py_asgi_ctx_data_t)); in nxt_python_asgi_ctx_data_alloc()
219 nxt_queue_init(&ctx_data->drain_queue); in nxt_python_asgi_ctx_data_alloc()
226 { "create_task", &ctx_data->loop_create_task }, in nxt_python_asgi_ctx_data_alloc()
227 { "add_reader", &ctx_data->loop_add_reader }, in nxt_python_asgi_ctx_data_alloc()
228 { "remove_reader", &ctx_data->loop_remove_reader }, in nxt_python_asgi_ctx_data_alloc()
229 { "call_soon", &ctx_data->loop_call_soon }, in nxt_python_asgi_ctx_data_alloc()
230 { "run_until_complete", &ctx_data->loop_run_until_complete }, in nxt_python_asgi_ctx_data_alloc()
231 { "create_future", &ctx_data->loop_create_future }, in nxt_python_asgi_ctx_data_alloc()
285 obj = PyObject_CallObject(ctx_data->loop_create_future, NULL); in nxt_python_asgi_ctx_data_alloc()
292 ctx_data->quit_future = obj; in nxt_python_asgi_ctx_data_alloc()
294 obj = PyObject_GetAttrString(ctx_data->quit_future, "set_result"); in nxt_python_asgi_ctx_data_alloc()
300 ctx_data->quit_future_set_result = obj; in nxt_python_asgi_ctx_data_alloc()
310 *pdata = ctx_data; in nxt_python_asgi_ctx_data_alloc()
316 nxt_python_asgi_ctx_data_free(ctx_data); in nxt_python_asgi_ctx_data_alloc()
328 nxt_py_asgi_ctx_data_t *ctx_data; in nxt_python_asgi_ctx_data_free() local
330 ctx_data = data; in nxt_python_asgi_ctx_data_free()
332 Py_XDECREF(ctx_data->loop_run_until_complete); in nxt_python_asgi_ctx_data_free()
333 Py_XDECREF(ctx_data->loop_create_future); in nxt_python_asgi_ctx_data_free()
334 Py_XDECREF(ctx_data->loop_create_task); in nxt_python_asgi_ctx_data_free()
335 Py_XDECREF(ctx_data->loop_call_soon); in nxt_python_asgi_ctx_data_free()
336 Py_XDECREF(ctx_data->loop_add_reader); in nxt_python_asgi_ctx_data_free()
337 Py_XDECREF(ctx_data->loop_remove_reader); in nxt_python_asgi_ctx_data_free()
338 Py_XDECREF(ctx_data->quit_future); in nxt_python_asgi_ctx_data_free()
339 Py_XDECREF(ctx_data->quit_future_set_result); in nxt_python_asgi_ctx_data_free()
341 nxt_unit_free(NULL, ctx_data); in nxt_python_asgi_ctx_data_free()
356 nxt_py_asgi_ctx_data_t *ctx_data; in nxt_python_asgi_run() local
358 ctx_data = ctx->data; in nxt_python_asgi_run()
360 res = PyObject_CallFunctionObjArgs(ctx_data->loop_run_until_complete, in nxt_python_asgi_run()
361 ctx_data->quit_future, NULL); in nxt_python_asgi_run()
381 nxt_py_asgi_ctx_data_t *ctx_data; in nxt_py_asgi_remove_reader() local
387 ctx_data = ctx->data; in nxt_py_asgi_remove_reader()
399 res = PyObject_CallFunctionObjArgs(ctx_data->loop_remove_reader, fd, NULL); in nxt_py_asgi_remove_reader()
418 nxt_py_asgi_ctx_data_t *ctx_data; in nxt_py_asgi_request_handler() local
521 ctx_data = req->ctx->data; in nxt_py_asgi_request_handler()
523 task = PyObject_CallFunctionObjArgs(ctx_data->loop_create_task, res, NULL); in nxt_py_asgi_request_handler()
962 nxt_py_asgi_ctx_data_t *ctx_data; in nxt_py_asgi_add_reader() local
966 ctx_data = ctx->data; in nxt_py_asgi_add_reader()
994 res = PyObject_CallFunctionObjArgs(ctx_data->loop_add_reader, in nxt_py_asgi_add_reader()
1039 nxt_py_asgi_ctx_data_t *ctx_data; in nxt_py_asgi_quit() local
1043 ctx_data = ctx->data; in nxt_py_asgi_quit()
1051 res = PyObject_CallFunctionObjArgs(ctx_data->quit_future_set_result, in nxt_py_asgi_quit()
1071 nxt_py_asgi_ctx_data_t *ctx_data; in nxt_py_asgi_shm_ack_handler() local
1073 ctx_data = ctx->data; in nxt_py_asgi_shm_ack_handler()
1075 while (!nxt_queue_is_empty(&ctx_data->drain_queue)) { in nxt_py_asgi_shm_ack_handler()
1076 lnk = nxt_queue_first(&ctx_data->drain_queue); in nxt_py_asgi_shm_ack_handler()
1096 nxt_py_asgi_ctx_data_t *ctx_data; in nxt_py_asgi_port_read() local
1134 ctx_data = ctx->data; in nxt_py_asgi_port_read()
1136 res = PyObject_CallFunctionObjArgs(ctx_data->loop_call_soon, in nxt_py_asgi_port_read()
1282 nxt_py_asgi_ctx_data_t *ctx_data, PyObject *future, PyObject *result) in nxt_py_asgi_set_result_soon() argument
1309 res = PyObject_CallFunctionObjArgs(ctx_data->loop_call_soon, set_result, in nxt_py_asgi_set_result_soon()
1438 nxt_py_asgi_ctx_data_t *ctx_data; in nxt_py_asgi_drain_wait() local
1440 ctx_data = req->ctx->data; in nxt_py_asgi_drain_wait()
1442 nxt_queue_insert_tail(&ctx_data->drain_queue, link); in nxt_py_asgi_drain_wait()