mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-24 14:22:28 +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/_datetimemodule.c
vendored
15
third_party/python/Modules/_datetimemodule.c
vendored
|
@ -1,24 +1,19 @@
|
|||
/* clang-format off */
|
||||
/* C implementation for the date/time type documented at
|
||||
* http://www.zope.org/Members/fdrake/DateTimeWiki/FrontPage
|
||||
*/
|
||||
|
||||
#include "Python.h"
|
||||
#include "structmember.h"
|
||||
|
||||
#include <time.h>
|
||||
#include "third_party/python/Include/Python.h"
|
||||
#include "third_party/python/Include/structmember.h"
|
||||
#include "libc/time/struct/tm.h"
|
||||
|
||||
#ifdef MS_WINDOWS
|
||||
# include <winsock2.h> /* struct timeval */
|
||||
#endif
|
||||
|
||||
/* Differentiate between building the core module and building extension
|
||||
* modules.
|
||||
*/
|
||||
#ifndef Py_BUILD_CORE
|
||||
#define Py_BUILD_CORE
|
||||
#endif
|
||||
#include "datetime.h"
|
||||
#include "third_party/python/Include/datetime.h"
|
||||
#undef Py_BUILD_CORE
|
||||
|
||||
/*[clinic input]
|
||||
|
@ -27,7 +22,7 @@ class datetime.datetime "PyDateTime_DateTime *" "&PyDateTime_DateTimeType"
|
|||
[clinic start generated code]*/
|
||||
/*[clinic end generated code: output=da39a3ee5e6b4b0d input=78142cb64b9e98bc]*/
|
||||
|
||||
#include "clinic/_datetimemodule.c.h"
|
||||
#include "third_party/python/Modules/clinic/_datetimemodule.inc"
|
||||
|
||||
/* We require that C int be at least 32 bits, and use int virtually
|
||||
* everywhere. In just a few cases we use a temp long, where a Python
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue