improved ready_fd call

This commit is contained in:
Unbit
2013-06-10 23:01:19 +02:00
parent dcc7167d75
commit 6c8fe2cc53
4 changed files with 16 additions and 3 deletions
+7
View File
@@ -2276,6 +2276,11 @@ PyObject *py_uwsgi_disconnect(PyObject * self, PyObject * args) {
return Py_None;
}
PyObject *py_uwsgi_ready_fd(PyObject * self, PyObject * args) {
struct wsgi_request *wsgi_req = py_current_wsgi_req();
return PyInt_FromLong(uwsgi_ready_fd(wsgi_req));
}
PyObject *py_uwsgi_parse_file(PyObject * self, PyObject * args) {
char *filename;
@@ -2516,6 +2521,8 @@ static PyMethodDef uwsgi_advanced_methods[] = {
{"chunked_read", py_uwsgi_chunked_read, METH_VARARGS, ""},
{"chunked_read_nb", py_uwsgi_chunked_read_nb, METH_VARARGS, ""},
{"ready_fd", py_uwsgi_ready_fd, METH_VARARGS, ""},
{NULL, NULL},
};