nxt_perl_psgi.c (1436:44ccce64ddf9) nxt_perl_psgi.c (1488:6976d36be926)
1
2/*
3 * Copyright (C) Alexander Borisov
4 * Copyright (C) NGINX, Inc.
5 */
6
7#include <perl/nxt_perl_psgi_layer.h>
8

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

90 nxt_unit_request_info_t *req);
91static ssize_t nxt_perl_psgi_io_read(nxt_unit_read_info_t *read_info, void *dst,
92 size_t size);
93static int nxt_perl_psgi_result_array(PerlInterpreter *my_perl,
94 SV *result, nxt_unit_request_info_t *req);
95static void nxt_perl_psgi_result_cb(PerlInterpreter *my_perl, SV *result,
96 nxt_unit_request_info_t *req);
97
1
2/*
3 * Copyright (C) Alexander Borisov
4 * Copyright (C) NGINX, Inc.
5 */
6
7#include <perl/nxt_perl_psgi_layer.h>
8

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

90 nxt_unit_request_info_t *req);
91static ssize_t nxt_perl_psgi_io_read(nxt_unit_read_info_t *read_info, void *dst,
92 size_t size);
93static int nxt_perl_psgi_result_array(PerlInterpreter *my_perl,
94 SV *result, nxt_unit_request_info_t *req);
95static void nxt_perl_psgi_result_cb(PerlInterpreter *my_perl, SV *result,
96 nxt_unit_request_info_t *req);
97
98static nxt_int_t nxt_perl_psgi_init(nxt_task_t *task,
99 nxt_common_app_conf_t *conf);
98static nxt_int_t nxt_perl_psgi_start(nxt_task_t *task,
99 nxt_process_data_t *conf);
100static void nxt_perl_psgi_request_handler(nxt_unit_request_info_t *req);
101static void nxt_perl_psgi_atexit(void);
102
103typedef SV *(*nxt_perl_psgi_callback_f)(PerlInterpreter *my_perl,
104 SV *env, nxt_task_t *task);
105
106static CV *nxt_perl_psgi_cb;
107static PerlInterpreter *nxt_perl_psgi;

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

114};
115
116NXT_EXPORT nxt_app_module_t nxt_app_module = {
117 sizeof(nxt_perl_psgi_compat),
118 nxt_perl_psgi_compat,
119 nxt_string("perl"),
120 PERL_VERSION_STRING,
121 NULL,
100static void nxt_perl_psgi_request_handler(nxt_unit_request_info_t *req);
101static void nxt_perl_psgi_atexit(void);
102
103typedef SV *(*nxt_perl_psgi_callback_f)(PerlInterpreter *my_perl,
104 SV *env, nxt_task_t *task);
105
106static CV *nxt_perl_psgi_cb;
107static PerlInterpreter *nxt_perl_psgi;

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

114};
115
116NXT_EXPORT nxt_app_module_t nxt_app_module = {
117 sizeof(nxt_perl_psgi_compat),
118 nxt_perl_psgi_compat,
119 nxt_string("perl"),
120 PERL_VERSION_STRING,
121 NULL,
122 nxt_perl_psgi_init,
122 nxt_perl_psgi_start,
123};
124
125
126static long
127nxt_perl_psgi_io_input_read(PerlInterpreter *my_perl,
128 nxt_perl_psgi_io_arg_t *arg, void *vbuf, size_t length)
129{
130 nxt_perl_psgi_input_t *input;

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

1129
1130 PUTBACK;
1131 FREETMPS;
1132 LEAVE;
1133}
1134
1135
1136static nxt_int_t
123};
124
125
126static long
127nxt_perl_psgi_io_input_read(PerlInterpreter *my_perl,
128 nxt_perl_psgi_io_arg_t *arg, void *vbuf, size_t length)
129{
130 nxt_perl_psgi_input_t *input;

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

1129
1130 PUTBACK;
1131 FREETMPS;
1132 LEAVE;
1133}
1134
1135
1136static nxt_int_t
1137nxt_perl_psgi_init(nxt_task_t *task, nxt_common_app_conf_t *conf)
1137nxt_perl_psgi_start(nxt_task_t *task, nxt_process_data_t *data)
1138{
1139 int rc;
1140 nxt_unit_ctx_t *unit_ctx;
1141 nxt_unit_init_t perl_init;
1142 PerlInterpreter *my_perl;
1138{
1139 int rc;
1140 nxt_unit_ctx_t *unit_ctx;
1141 nxt_unit_init_t perl_init;
1142 PerlInterpreter *my_perl;
1143 nxt_common_app_conf_t *conf;
1143 nxt_perl_psgi_module_t module;
1144
1144 nxt_perl_psgi_module_t module;
1145
1146 conf = data->app;
1147
1145 my_perl = nxt_perl_psgi_interpreter_init(task, conf->u.perl.script,
1146 &module.app);
1147
1148 if (nxt_slow_path(my_perl == NULL)) {
1149 return NXT_ERROR;
1150 }
1151
1152 module.my_perl = my_perl;

--- 103 unchanged lines hidden ---
1148 my_perl = nxt_perl_psgi_interpreter_init(task, conf->u.perl.script,
1149 &module.app);
1150
1151 if (nxt_slow_path(my_perl == NULL)) {
1152 return NXT_ERROR;
1153 }
1154
1155 module.my_perl = my_perl;

--- 103 unchanged lines hidden ---