It will always be a string, because it is created just before this call.
authorJeremy Hylton <jeremy@alum.mit.edu>
Mon, 20 Aug 2001 19:06:36 +0000 (19:06 +0000)
committerJeremy Hylton <jeremy@alum.mit.edu>
Mon, 20 Aug 2001 19:06:36 +0000 (19:06 +0000)
Modules/socketmodule.c

index 525a19e72770e78f2deef1cf10d930ca4ae825d8..0917a317e02f93fa7b078d7e9248f2863e250cb6 100644 (file)
@@ -1471,7 +1471,7 @@ PySocketSock_recv(PySocketSockObject *s, PyObject *args)
        if (buf == NULL)
                return NULL;
        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
        if (n < 0) {
                Py_DECREF(buf);