Python3 support back to the future

This commit is contained in:
roberto@maverick64
2011-01-21 10:17:52 +01:00
parent 66b1cdd63c
commit 07dd0c2c0b
5 changed files with 55 additions and 26 deletions
+5 -2
View File
@@ -1479,8 +1479,7 @@ clear:
}
static PyTypeObject uwsgi_IterType = {
PyObject_HEAD_INIT(NULL)
0, /*ob_size*/
PyVarObject_HEAD_INIT(NULL, 0)
"uwsgi._Iter", /*tp_name*/
sizeof(uwsgi_Iter), /*tp_basicsize*/
0, /*tp_itemsize*/
@@ -1499,7 +1498,11 @@ static PyTypeObject uwsgi_IterType = {
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
#if defined(Py_TPFLAGS_HAVE_ITER)
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_ITER,
#else
Py_TPFLAGS_DEFAULT,
#endif
"uwsgi response iterator object.", /* tp_doc */
0, /* tp_traverse */
0, /* tp_clear */
+4
View File
@@ -34,7 +34,11 @@ PyObject *py_uwsgi_spit(PyObject * self, PyObject * args) {
goto clear;
}
#ifdef PYTHREE
if (!PyUnicode_Check(head)) {
#else
if (!PyString_Check(head)) {
#endif
uwsgi_log( "http status must be a string !\n");
goto clear;
}