first attempt of a better wsgi.input

This commit is contained in:
roberto@maverick64
2011-02-14 20:48:01 +01:00
parent 7744285dc3
commit c4eccd0d93
9 changed files with 268 additions and 32 deletions

View File

@@ -3,6 +3,8 @@
extern struct uwsgi_server uwsgi;
struct uwsgi_python up;
extern PyTypeObject uwsgi_InputType;
struct option uwsgi_python_options[] = {
{"wsgi-file", required_argument, 0, LONG_ARGS_WSGI_FILE},
{"file", required_argument, 0, LONG_ARGS_FILE_CONFIG},
@@ -23,6 +25,7 @@ struct option uwsgi_python_options[] = {
#endif
{"catch-exceptions", no_argument, &up.catch_exceptions, 1},
{"ignore-script-name", no_argument, &up.ignore_script_name, 1},
{"pep3333-input", no_argument, &up.pep3333_input, 1},
{"no-site", no_argument, &Py_NoSiteFlag, 1},
{0, 0, 0, 0},
@@ -324,6 +327,8 @@ void init_uwsgi_embedded_module() {
PyObject *new_uwsgi_module, *zero;
int i;
PyType_Ready(&uwsgi_InputType);
/* initialize for stats */
up.workers_tuple = PyTuple_New(uwsgi.numproc);
for (i = 0; i < uwsgi.numproc; i++) {