Fix a minor style consistency issue.
When getting a string buffer for a string we just created, use
PyString_AS_STRING() instead of PyString_AsString() to avoid the
call overhead and extra type check.
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index 7e14743..062f88d 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -962,8 +962,8 @@
socklen_t buflen = 0;
#ifdef __BEOS__
-/* We have incomplete socket support. */
- PyErr_SetString( PySocket_Error, "getsockopt not supported" );
+ /* We have incomplete socket support. */
+ PyErr_SetString(PySocket_Error, "getsockopt not supported");
return NULL;
#else
@@ -989,7 +989,7 @@
if (buf == NULL)
return NULL;
res = getsockopt(s->sock_fd, level, optname,
- (void *)PyString_AsString(buf), &buflen);
+ (void *)PyString_AS_STRING(buf), &buflen);
if (res < 0) {
Py_DECREF(buf);
return PySocket_Err();