fixed python 3

This commit is contained in:
roberto@precise64
2012-03-01 18:30:32 +01:00
parent 1a42194304
commit c7d967d43c
+8
View File
@@ -1480,7 +1480,11 @@ PyObject *py_uwsgi_sharedarea_read(PyObject * self, PyObject * args) {
}
PyObject *ret = PyString_FromStringAndSize(NULL, len);
#ifdef PYTHREE
char *storage = PyBytes_AsString(ret);
#else
char *storage = PyString_AS_STRING(ret);
#endif
UWSGI_RELEASE_GIL
@@ -3518,7 +3522,11 @@ PyObject *py_uwsgi_cache_get(PyObject * self, PyObject * args) {
}
UWSGI_GET_GIL
PyObject *ret = PyString_FromStringAndSize(NULL, valsize);
#ifdef PYTHREE
char *storage = PyBytes_AsString(ret);
#else
char *storage = PyString_AS_STRING(ret);
#endif
UWSGI_RELEASE_GIL
#ifdef UWSGI_DEBUG
gettimeofday(&tv2, NULL);