Mercurial > cpython-lru_cache-weakref
diff Modules/socketmodule.c @ 6718:32f2eda2946c legacy-trunk
Left-aligned preprocessor directives and changed C++ comments to C
comments.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Tue, 02 Dec 1997 20:37:32 +0000 |
| parents | 5e31d381fa47 |
| children | ee2aaa2f722a |
line wrap: on
line diff
--- a/Modules/socketmodule.c Tue Dec 02 20:36:02 1997 +0000 +++ b/Modules/socketmodule.c Tue Dec 02 20:37:32 1997 +0000 @@ -939,11 +939,11 @@ Py_BEGIN_ALLOW_THREADS n = recvfrom(s->sock_fd, PyString_AsString(buf), len, flags, #ifndef MS_WINDOWS - #if defined(PYOS_OS2) +#if defined(PYOS_OS2) (struct sockaddr *)addrbuf, &addrlen - #else +#else (ANY *)addrbuf, &addrlen - #endif +#endif #else (struct sockaddr *)addrbuf, &addrlen #endif @@ -1465,14 +1465,14 @@ int rc = sock_init(); if (rc == 0) { - atexit(OS2cleanup); - return 1; // Indicate Success + atexit(OS2cleanup); + return 1; /* Indicate Success */ } sprintf(reason, "OS/2 TCP/IP Error# %d", sock_errno()); PyErr_SetString(PyExc_ImportError, reason); - return 0; // Indicate Failure + return 0; /* Indicate Failure */ } #endif /* PYOS_OS2 */ @@ -1510,13 +1510,13 @@ return; m = Py_InitModule("_socket", PySocket_methods); #else - #if defined(__TOS_OS2__) +#if defined(__TOS_OS2__) if (!OS2init()) return; m = Py_InitModule("_socket", PySocket_methods); - #else +#else m = Py_InitModule("socket", PySocket_methods); - #endif +#endif #endif d = PyModule_GetDict(m); PySocket_Error = PyErr_NewException("socket.error", NULL, NULL);
