allow compilation of pump in python3

This commit is contained in:
roberto@debian32
2011-08-02 15:38:41 +02:00
parent e76c696678
commit b64690bdd6
+4
View File
@@ -310,8 +310,12 @@ int uwsgi_response_subhandler_pump(struct wsgi_request *wsgi_req) {
wsgi_req->response_size += wsize;
goto clear;
}
#ifdef PYTHREE
else if ((wsgi_req->sendfile_fd = PyObject_AsFileDescriptor((PyObject *)wsgi_req->async_placeholder)) > -1) {
#else
else if (PyFile_Check((PyObject *)wsgi_req->async_placeholder)) {
wsgi_req->sendfile_fd = fileno(PyFile_AsFile((PyObject *)wsgi_req->async_placeholder));
#endif
wsize = uwsgi_sendfile(wsgi_req);
if (wsize < 0) {
goto clear;