Reduce header complexity

- Remove most __ASSEMBLER__ __LINKER__ ifdefs
- Rename libc/intrin/bits.h to libc/serialize.h
- Block pthread cancelation in fchmodat() polyfill
- Remove `clang-format off` statements in third_party
This commit is contained in:
Justine Tunney 2023-11-28 14:24:28 -08:00
parent 96f979dfc5
commit fa20edc44d
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
3057 changed files with 410 additions and 4398 deletions

View file

@ -21,7 +21,6 @@
#include "third_party/python/Include/weakrefobject.h"
#include "third_party/python/Include/yoink.h"
#include "third_party/python/Modules/_io/_iomodule.h"
/* clang-format off */
PYTHON_PROVIDE("_io");
PYTHON_PROVIDE("_io.BlockingIOError");

View file

@ -3,9 +3,7 @@
#include "libc/calls/weirdtypes.h"
#include "third_party/python/Include/moduleobject.h"
#include "third_party/python/Include/object.h"
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
/* clang-format off */
/* ABCs */
extern PyTypeObject PyIOBase_Type;
@ -193,5 +191,4 @@ extern PyObject *_PyIO_zero;
extern PyTypeObject _PyBytesIOBuffer_Type;
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#endif /* COSMOPOLITAN_THIRD_PARTY_PYTHON_MODULES__IO__IOMODULE_H_ */

View file

@ -23,7 +23,6 @@
#include "third_party/python/Include/pythread.h"
#include "third_party/python/Include/structmember.h"
#include "third_party/python/Modules/_io/_iomodule.h"
/* clang-format off */
/*
An implementation of Buffered I/O as defined by PEP 3116 - "New I/O"

View file

@ -23,7 +23,6 @@
#include "third_party/python/Include/sysmodule.h"
#include "third_party/python/Include/tupleobject.h"
#include "third_party/python/Modules/_io/_iomodule.h"
/* clang-format off */
/*[clinic input]
module _io

View file

@ -1,4 +1,3 @@
/* clang-format off */
/*[clinic input]
preserve
[clinic start generated code]*/

View file

@ -1,4 +1,3 @@
/* clang-format off */
/*[clinic input]
preserve
[clinic start generated code]*/

View file

@ -1,4 +1,3 @@
/* clang-format off */
/*[clinic input]
preserve
[clinic start generated code]*/

View file

@ -1,4 +1,3 @@
/* clang-format off */
/*[clinic input]
preserve
[clinic start generated code]*/

View file

@ -1,4 +1,3 @@
/* clang-format off */
/*[clinic input]
preserve
[clinic start generated code]*/

View file

@ -1,4 +1,3 @@
/* clang-format off */
/*[clinic input]
preserve
[clinic start generated code]*/

View file

@ -1,4 +1,3 @@
/* clang-format off */
/*[clinic input]
preserve
[clinic start generated code]*/

View file

@ -1,4 +1,3 @@
/* clang-format off */
/*[clinic input]
preserve
[clinic start generated code]*/

View file

@ -24,7 +24,6 @@
#include "third_party/python/Include/structmember.h"
#include "third_party/python/Include/warnings.h"
#include "third_party/python/Modules/_io/_iomodule.h"
/* clang-format off */
/*
* Author: Daniel Stutzbach

View file

@ -18,7 +18,6 @@
#include "third_party/python/Include/pymacro.h"
#include "third_party/python/Include/structmember.h"
#include "third_party/python/Modules/_io/_iomodule.h"
/* clang-format off */
/*
An implementation of the I/O abstract base classes hierarchy

View file

@ -19,7 +19,6 @@
#include "third_party/python/Include/structmember.h"
#include "third_party/python/Include/unicodeobject.h"
#include "third_party/python/Modules/_io/_iomodule.h"
/* clang-format off */
/* Implementation note: the buffer is always at least one character longer
than the enclosed string, for proper functioning of _PyIO_find_line_ending.

View file

@ -21,7 +21,6 @@
#include "third_party/python/Include/structmember.h"
#include "third_party/python/Include/tupleobject.h"
#include "third_party/python/Modules/_io/_iomodule.h"
/* clang-format off */
/*
An implementation of Text I/O as defined by PEP 3116 - "New I/O"

View file

@ -6,7 +6,6 @@
*/
#define PY_SSIZE_T_CLEAN
#include "third_party/python/Modules/_io/_iomodule.h"
/* clang-format off */
/*
An implementation of Windows console I/O