mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-09-07 14:11:46 +00:00
fixed python 3
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user