mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-22 21:32:31 +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
15
third_party/python/Modules/arraymodule.c
vendored
15
third_party/python/Modules/arraymodule.c
vendored
|
@ -1,19 +1,12 @@
|
|||
/* clang-format off */
|
||||
/* Array object implementation */
|
||||
|
||||
/* An array is a uniform list -- all items have the same type.
|
||||
The item type is restricted to simple C types like int or float */
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include "Python.h"
|
||||
#include "structmember.h"
|
||||
|
||||
#ifdef STDC_HEADERS
|
||||
#include <stddef.h>
|
||||
#else /* !STDC_HEADERS */
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h> /* For size_t */
|
||||
#endif /* HAVE_SYS_TYPES_H */
|
||||
#endif /* !STDC_HEADERS */
|
||||
#include "third_party/python/Include/Python.h"
|
||||
#include "third_party/python/Include/structmember.h"
|
||||
|
||||
/*[clinic input]
|
||||
module array
|
||||
|
@ -102,7 +95,7 @@ enum machine_format_code {
|
|||
* Must come after arrayobject, arrayiterobject,
|
||||
* and enum machine_code_type definitions.
|
||||
*/
|
||||
#include "clinic/arraymodule.c.h"
|
||||
#include "third_party/python/Modules/clinic/arraymodule.inc"
|
||||
|
||||
#define array_Check(op) PyObject_TypeCheck(op, &Arraytype)
|
||||
#define array_CheckExact(op) (Py_TYPE(op) == &Arraytype)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue