mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-25 06:42:27 +00:00
Fix some issues and do some code cleanup
This commit is contained in:
parent
1f229e4efc
commit
312ed5c67c
72 changed files with 880 additions and 982 deletions
2
third_party/python/Lib/test/test_doctest.py
vendored
2
third_party/python/Lib/test/test_doctest.py
vendored
|
@ -2921,7 +2921,7 @@ Invalid file name:
|
|||
>>> print(normalize(err)) # doctest: +ELLIPSIS
|
||||
Traceback (most recent call last):
|
||||
...
|
||||
FileNotFoundError: [Errno 2] ENOENT/2/No such file or directory: 'nosuchfile'
|
||||
FileNotFoundError: [Errno 2] ENOENT...
|
||||
|
||||
Invalid doctest option:
|
||||
|
||||
|
|
2
third_party/python/Lib/test/test_module.py
vendored
2
third_party/python/Lib/test/test_module.py
vendored
|
@ -29,7 +29,7 @@ class ModuleTests(unittest.TestCase):
|
|||
self.fail("__name__ = %s" % repr(s))
|
||||
except AttributeError:
|
||||
pass
|
||||
if cosmo.MODE != 'tiny':
|
||||
if 'tiny' not in cosmo.MODE:
|
||||
self.assertEqual(foo.__doc__, ModuleType.__doc__)
|
||||
|
||||
def test_uninitialized_missing_getattr(self):
|
||||
|
|
5
third_party/python/Modules/socketmodule.c
vendored
5
third_party/python/Modules/socketmodule.c
vendored
|
@ -12,6 +12,7 @@
|
|||
#include "libc/dns/ent.h"
|
||||
#include "libc/errno.h"
|
||||
#include "libc/nt/enum/version.h"
|
||||
#include "libc/nt/version.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/sock/sock.h"
|
||||
#include "libc/sysv/consts/af.h"
|
||||
|
@ -7146,9 +7147,9 @@ PyInit__socket(void)
|
|||
if (TCP_USER_TIMEOUT) PyModule_AddIntMacro(m, TCP_USER_TIMEOUT);
|
||||
if (TCP_SAVE_SYN) PyModule_AddIntMacro(m, TCP_SAVE_SYN);
|
||||
if (TCP_SAVED_SYN) PyModule_AddIntMacro(m, TCP_SAVED_SYN);
|
||||
if (TCP_KEEPCNT && (!IsWindows() || NtGetVersion() >= kNtVersionWindows10))
|
||||
if (TCP_KEEPCNT && (!IsWindows() || IsAtLeastWindows10()))
|
||||
PyModule_AddIntMacro(m, TCP_KEEPCNT);
|
||||
if (TCP_FASTOPEN && (!IsWindows() || NtGetVersion() >= kNtVersionWindows10))
|
||||
if (TCP_FASTOPEN && (!IsWindows() || IsAtLeastWindows10()))
|
||||
PyModule_AddIntMacro(m, TCP_FASTOPEN);
|
||||
if (TCP_FASTOPEN_CONNECT)
|
||||
PyModule_AddIntMacro(m, TCP_FASTOPEN_CONNECT);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue