It will always be a string, because it is created just before this call.
This commit is contained in:
parent
31d833d575
commit
1ba6bada67
|
@ -1471,7 +1471,7 @@ PySocketSock_recv(PySocketSockObject *s, PyObject *args)
|
||||||
if (buf == NULL)
|
if (buf == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
Py_BEGIN_ALLOW_THREADS
|
Py_BEGIN_ALLOW_THREADS
|
||||||
n = recv(s->sock_fd, PyString_AsString(buf), len, flags);
|
n = recv(s->sock_fd, PyString_AS_STRING(buf), len, flags);
|
||||||
Py_END_ALLOW_THREADS
|
Py_END_ALLOW_THREADS
|
||||||
if (n < 0) {
|
if (n < 0) {
|
||||||
Py_DECREF(buf);
|
Py_DECREF(buf);
|
||||||
|
|
Loading…
Reference in New Issue