Kaydet (Commit) 32c575da authored tarafından Guido van Rossum's avatar Guido van Rossum

Left-aligned preprocessor directives and changed C++ comments to C

comments.
üst c5a0f532
...@@ -939,11 +939,11 @@ BUILD_FUNC_DEF_2(PySocketSock_recvfrom,PySocketSockObject *,s, PyObject *,args) ...@@ -939,11 +939,11 @@ BUILD_FUNC_DEF_2(PySocketSock_recvfrom,PySocketSockObject *,s, PyObject *,args)
Py_BEGIN_ALLOW_THREADS Py_BEGIN_ALLOW_THREADS
n = recvfrom(s->sock_fd, PyString_AsString(buf), len, flags, n = recvfrom(s->sock_fd, PyString_AsString(buf), len, flags,
#ifndef MS_WINDOWS #ifndef MS_WINDOWS
#if defined(PYOS_OS2) #if defined(PYOS_OS2)
(struct sockaddr *)addrbuf, &addrlen (struct sockaddr *)addrbuf, &addrlen
#else #else
(ANY *)addrbuf, &addrlen (ANY *)addrbuf, &addrlen
#endif #endif
#else #else
(struct sockaddr *)addrbuf, &addrlen (struct sockaddr *)addrbuf, &addrlen
#endif #endif
...@@ -1465,14 +1465,14 @@ OS2init() ...@@ -1465,14 +1465,14 @@ OS2init()
int rc = sock_init(); int rc = sock_init();
if (rc == 0) { if (rc == 0) {
atexit(OS2cleanup); atexit(OS2cleanup);
return 1; // Indicate Success return 1; /* Indicate Success */
} }
sprintf(reason, "OS/2 TCP/IP Error# %d", sock_errno()); sprintf(reason, "OS/2 TCP/IP Error# %d", sock_errno());
PyErr_SetString(PyExc_ImportError, reason); PyErr_SetString(PyExc_ImportError, reason);
return 0; // Indicate Failure return 0; /* Indicate Failure */
} }
#endif /* PYOS_OS2 */ #endif /* PYOS_OS2 */
...@@ -1510,13 +1510,13 @@ initsocket() ...@@ -1510,13 +1510,13 @@ initsocket()
return; return;
m = Py_InitModule("_socket", PySocket_methods); m = Py_InitModule("_socket", PySocket_methods);
#else #else
#if defined(__TOS_OS2__) #if defined(__TOS_OS2__)
if (!OS2init()) if (!OS2init())
return; return;
m = Py_InitModule("_socket", PySocket_methods); m = Py_InitModule("_socket", PySocket_methods);
#else #else
m = Py_InitModule("socket", PySocket_methods); m = Py_InitModule("socket", PySocket_methods);
#endif #endif
#endif #endif
d = PyModule_GetDict(m); d = PyModule_GetDict(m);
PySocket_Error = PyErr_NewException("socket.error", NULL, NULL); PySocket_Error = PyErr_NewException("socket.error", NULL, NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment