mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-25 06:42:27 +00:00
Perform build and magnum tuning
Building o//third_party/python now takes 5 seconds on my PC This change works towards modifying Python to use runtime dispatching when appropriate. For example, when loading the magnums in the socket module, it's a good idea to check if the magnum is zero, because that means the local system platform doesn't support it.
This commit is contained in:
parent
ee7e296339
commit
d26d7ae0e4
1028 changed files with 6576 additions and 172777 deletions
11
third_party/python/Modules/_ssl.c
vendored
11
third_party/python/Modules/_ssl.c
vendored
|
@ -1,3 +1,4 @@
|
|||
/* clang-format off */
|
||||
/* SSL socket module
|
||||
|
||||
SSL support based on patches by Brian E Gallew and Laszlo Kovacs.
|
||||
|
@ -16,10 +17,10 @@
|
|||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
|
||||
#include "Python.h"
|
||||
#include "third_party/python/Include/Python.h"
|
||||
|
||||
#ifdef WITH_THREAD
|
||||
#include "pythread.h"
|
||||
#include "third_party/python/Include/pythread.h"
|
||||
|
||||
|
||||
#define PySSL_BEGIN_ALLOW_THREADS_S(save) \
|
||||
|
@ -45,7 +46,7 @@
|
|||
#endif
|
||||
|
||||
/* Include symbols from _socket module */
|
||||
#include "socketmodule.h"
|
||||
#include "third_party/python/Modules/socketmodule.h"
|
||||
|
||||
static PySocketModule_APIObject PySocketModule;
|
||||
|
||||
|
@ -103,7 +104,7 @@ struct py_ssl_library_code {
|
|||
};
|
||||
|
||||
/* Include generated data (error codes) */
|
||||
#include "_ssl_data.h"
|
||||
#include "third_party/python/Modules/_ssl_data.inc"
|
||||
|
||||
#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER)
|
||||
# define OPENSSL_VERSION_1_1 1
|
||||
|
@ -387,7 +388,7 @@ class _ssl.SSLSession "PySSLSession *" "&PySSLSession_Type"
|
|||
[clinic start generated code]*/
|
||||
/*[clinic end generated code: output=da39a3ee5e6b4b0d input=bdc67fafeeaa8109]*/
|
||||
|
||||
#include "clinic/_ssl.c.h"
|
||||
#include "third_party/python/Modules/clinic/_ssl.inc"
|
||||
|
||||
static int PySSL_select(PySocketSockObject *s, int writing, _PyTime_t timeout);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue