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

@ -29,7 +29,6 @@ asm(".ident\t\"\\n\\n\
pysqlite (zlib license)\\n\
Copyright (C) 2005-2010 Gerhard Häring <gh@ghaering.de>\"");
asm(".include \"libc/disclaimer.inc\"");
/* clang-format off */
/* only used internally */
pysqlite_Node* pysqlite_new_node(PyObject* key, PyObject* data)

View file

@ -1,7 +1,6 @@
#ifndef PYSQLITE_CACHE_H
#define PYSQLITE_CACHE_H
#include "third_party/python/Include/Python.h"
/* clang-format off */
/* The LRU cache is implemented as a combination of a doubly-linked with a
* dictionary. The list items are of type 'Node' and the dictionary has the

View file

@ -40,7 +40,6 @@ asm(".ident\t\"\\n\\n\
pysqlite (zlib license)\\n\
Copyright (C) 2005-2010 Gerhard Häring <gh@ghaering.de>\"");
asm(".include \"libc/disclaimer.inc\"");
/* clang-format off */
#define ACTION_FINALIZE 1
#define ACTION_RESET 2

View file

@ -6,7 +6,6 @@
#include "third_party/python/Modules/_sqlite/cache.h"
#include "third_party/python/Modules/_sqlite/module.h"
#include "third_party/sqlite3/sqlite3.h"
/* clang-format off */
typedef struct
{

View file

@ -31,7 +31,6 @@ asm(".ident\t\"\\n\\n\
pysqlite (zlib license)\\n\
Copyright (C) 2005-2010 Gerhard Häring <gh@ghaering.de>\"");
asm(".include \"libc/disclaimer.inc\"");
/* clang-format off */
PyObject* pysqlite_cursor_iternext(pysqlite_Cursor* self);

View file

@ -1,7 +1,6 @@
#ifndef PYSQLITE_CURSOR_H
#define PYSQLITE_CURSOR_H
#include "third_party/python/Include/Python.h"
/* clang-format off */
#include "third_party/python/Modules/_sqlite/statement.h"
#include "third_party/python/Modules/_sqlite/connection.h"

View file

@ -31,7 +31,6 @@ asm(".ident\t\"\\n\\n\
pysqlite (zlib license)\\n\
Copyright (C) 2005-2010 Gerhard Häring <gh@ghaering.de>\"");
asm(".include \"libc/disclaimer.inc\"");
/* clang-format off */
/** the adapters registry **/

View file

@ -2,7 +2,6 @@
#define PSYCOPG_MICROPROTOCOLS_H 1
#include "third_party/python/Include/Python.h"
#include "third_party/python/Modules/_sqlite/cursor.h"
/* clang-format off */
/** adapters registry **/

View file

@ -38,7 +38,6 @@ asm(".ident\t\"\\n\\n\
pysqlite (zlib license)\\n\
Copyright (C) 2005-2010 Gerhard Häring <gh@ghaering.de>\"");
asm(".include \"libc/disclaimer.inc\"");
/* clang-format off */
/* #if SQLITE_VERSION_NUMBER >= 3003003 */
/* #define HAVE_SHARED_CACHE */

View file

@ -1,7 +1,6 @@
#ifndef PYSQLITE_MODULE_H
#define PYSQLITE_MODULE_H
#include "third_party/python/Include/Python.h"
/* clang-format off */
#define PYSQLITE_VERSION "2.6.0"

View file

@ -29,7 +29,6 @@ asm(".ident\t\"\\n\\n\
pysqlite (zlib license)\\n\
Copyright (C) 2005-2010 Gerhard Häring <gh@ghaering.de>\"");
asm(".include \"libc/disclaimer.inc\"");
/* clang-format off */
int pysqlite_prepare_protocol_init(pysqlite_PrepareProtocol* self, PyObject* args, PyObject* kwargs)
{

View file

@ -1,7 +1,6 @@
#ifndef PYSQLITE_PREPARE_PROTOCOL_H
#define PYSQLITE_PREPARE_PROTOCOL_H
#include "third_party/python/Include/Python.h"
/* clang-format off */
typedef struct
{

View file

@ -30,7 +30,6 @@ asm(".ident\t\"\\n\\n\
pysqlite (zlib license)\\n\
Copyright (C) 2005-2010 Gerhard Häring <gh@ghaering.de>\"");
asm(".include \"libc/disclaimer.inc\"");
/* clang-format off */
void pysqlite_row_dealloc(pysqlite_Row* self)
{

View file

@ -1,7 +1,6 @@
#ifndef PYSQLITE_ROW_H
#define PYSQLITE_ROW_H
#include "third_party/python/Include/Python.h"
/* clang-format off */
typedef struct _Row
{

View file

@ -34,7 +34,6 @@ asm(".ident\t\"\\n\\n\
pysqlite (zlib license)\\n\
Copyright (C) 2005-2010 Gerhard Häring <gh@ghaering.de>\"");
asm(".include \"libc/disclaimer.inc\"");
/* clang-format off */
/* prototypes */
static int pysqlite_check_remaining_sql(const char* tail);

View file

@ -3,7 +3,6 @@
#include "third_party/python/Include/Python.h"
#include "third_party/python/Modules/_sqlite/connection.h"
#include "third_party/sqlite3/sqlite3.h"
/* clang-format off */
#define PYSQLITE_TOO_MUCH_SQL (-100)
#define PYSQLITE_SQL_WRONG_TYPE (-101)

View file

@ -30,7 +30,6 @@ asm(".ident\t\"\\n\\n\
pysqlite (zlib license)\\n\
Copyright (C) 2005-2010 Gerhard Häring <gh@ghaering.de>\"");
asm(".include \"libc/disclaimer.inc\"");
/* clang-format off */
int pysqlite_step(sqlite3_stmt* statement, pysqlite_Connection* connection)
{

View file

@ -1,6 +1,5 @@
#ifndef PYSQLITE_UTIL_H
#define PYSQLITE_UTIL_H
/* clang-format off */
#include "third_party/python/Include/Python.h"
#include "third_party/python/Include/pythread.h"
#include "third_party/python/Modules/_sqlite/connection.h"