bpo-40268: Remove unused structmember.h includes (GH-19530)
If only offsetof() is needed: include stddef.h instead. When structmember.h is used, add a comment explaining that PyMemberDef is used.
This commit is contained in:
parent
62183b8d6d
commit
4a21e57fe5
|
@ -1,7 +1,6 @@
|
|||
/* ABCMeta implementation */
|
||||
|
||||
#include "Python.h"
|
||||
#include "structmember.h"
|
||||
#include "clinic/_abc.c.h"
|
||||
|
||||
/*[clinic input]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "Python.h"
|
||||
#include "structmember.h"
|
||||
#include <stddef.h> // offsetof()
|
||||
|
||||
|
||||
/*[clinic input]
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#define PY_SSIZE_T_CLEAN
|
||||
|
||||
#include "Python.h"
|
||||
#include "structmember.h"
|
||||
#include "structmember.h" // PyMemberDef
|
||||
|
||||
#include <bzlib.h>
|
||||
#include <stdio.h>
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#include "Python.h"
|
||||
#include "structmember.h"
|
||||
#include "structmember.h" // PyMemberDef
|
||||
|
||||
#ifdef STDC_HEADERS
|
||||
#include <stddef.h>
|
||||
#else
|
||||
#include <sys/types.h> /* For size_t */
|
||||
#include <sys/types.h> // size_t
|
||||
#endif
|
||||
|
||||
/*[clinic input]
|
||||
|
|
|
@ -11,7 +11,7 @@ module instead.
|
|||
#define MODULE_VERSION "1.0"
|
||||
|
||||
#include "Python.h"
|
||||
#include "structmember.h"
|
||||
#include "structmember.h" // PyMemberDef
|
||||
#include <stdbool.h>
|
||||
|
||||
|
||||
|
|
|
@ -102,7 +102,7 @@ bytes(cdata)
|
|||
#define PY_SSIZE_T_CLEAN
|
||||
|
||||
#include "Python.h"
|
||||
#include "structmember.h"
|
||||
#include "structmember.h" // PyMemberDef
|
||||
|
||||
#include <ffi.h>
|
||||
#ifdef MS_WIN32
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
*/
|
||||
|
||||
#include "Python.h"
|
||||
#include "structmember.h"
|
||||
#include "structmember.h" // PyMemberDef
|
||||
|
||||
#ifdef MS_WIN32
|
||||
#include <windows.h>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
#include "Python.h"
|
||||
#include "datetime.h"
|
||||
#include "structmember.h"
|
||||
#include "structmember.h" // PyMemberDef
|
||||
|
||||
#include <time.h>
|
||||
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
|
||||
#include <Python.h>
|
||||
#include "longintrepr.h"
|
||||
#include "structmember.h"
|
||||
#include "complexobject.h"
|
||||
#include "mpdecimal.h"
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#define PY_SSIZE_T_CLEAN
|
||||
|
||||
#include "Python.h"
|
||||
#include "structmember.h"
|
||||
#include "structmember.h" // PyMemberDef
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/* configuration */
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#include "Python.h"
|
||||
#include "pycore_pymem.h"
|
||||
#include "pycore_pystate.h" // _PyThreadState_GET()
|
||||
#include "pycore_pystate.h" // _PyThreadState_GET()
|
||||
#include "pycore_tupleobject.h"
|
||||
#include "structmember.h"
|
||||
#include "structmember.h" // PyMemberDef
|
||||
|
||||
/* _functools module written and maintained
|
||||
by Hye-Shik Chang <perky@FreeBSD.org>
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
#define PY_SSIZE_T_CLEAN
|
||||
|
||||
#include "Python.h"
|
||||
#include "structmember.h"
|
||||
#include "hashlib.h"
|
||||
#include "pystrhex.h"
|
||||
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include "Python.h"
|
||||
#include "structmember.h"
|
||||
#include "_iomodule.h"
|
||||
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#define PY_SSIZE_T_CLEAN
|
||||
#include "Python.h"
|
||||
#include "pycore_object.h"
|
||||
#include "structmember.h"
|
||||
#include "structmember.h" // PyMemberDef
|
||||
#include "_iomodule.h"
|
||||
|
||||
/*[clinic input]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "Python.h"
|
||||
#include "pycore_object.h"
|
||||
#include "structmember.h" /* for offsetof() */
|
||||
#include <stddef.h> // offsetof()
|
||||
#include "_iomodule.h"
|
||||
|
||||
/*[clinic input]
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#define PY_SSIZE_T_CLEAN
|
||||
#include "Python.h"
|
||||
#include "pycore_object.h"
|
||||
#include "structmember.h"
|
||||
#include "structmember.h" // PyMemberDef
|
||||
#include <stdbool.h>
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#define PY_SSIZE_T_CLEAN
|
||||
#include "Python.h"
|
||||
#include "pycore_object.h"
|
||||
#include "structmember.h"
|
||||
#include <stddef.h> // offsetof()
|
||||
#include "_iomodule.h"
|
||||
|
||||
/*[clinic input]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#define PY_SSIZE_T_CLEAN
|
||||
#include "Python.h"
|
||||
#include "structmember.h"
|
||||
#include <stddef.h> // offsetof()
|
||||
#include "pycore_accu.h"
|
||||
#include "pycore_object.h"
|
||||
#include "_iomodule.h"
|
||||
|
|
|
@ -8,10 +8,10 @@
|
|||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include "Python.h"
|
||||
#include "pycore_interp.h" // PyInterpreterState.fs_codec
|
||||
#include "pycore_interp.h" // PyInterpreterState.fs_codec
|
||||
#include "pycore_object.h"
|
||||
#include "pycore_pystate.h" // _PyInterpreterState_GET()
|
||||
#include "structmember.h"
|
||||
#include "pycore_pystate.h" // _PyInterpreterState_GET()
|
||||
#include "structmember.h" // PyMemberDef
|
||||
#include "_iomodule.h"
|
||||
|
||||
/*[clinic input]
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
#ifdef MS_WINDOWS
|
||||
|
||||
#include "structmember.h"
|
||||
#include "structmember.h" // PyMemberDef
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#endif
|
||||
|
||||
#include "Python.h"
|
||||
#include "structmember.h"
|
||||
#include "structmember.h" // PyMemberDef
|
||||
#include "pycore_accu.h"
|
||||
|
||||
typedef struct {
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#define PY_SSIZE_T_CLEAN
|
||||
|
||||
#include "Python.h"
|
||||
#include "structmember.h"
|
||||
#include "structmember.h" // PyMemberDef
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
|
|
|
@ -5,7 +5,6 @@ posixshmem - A Python extension that provides shm_open() and shm_unlink()
|
|||
#define PY_SSIZE_T_CLEAN
|
||||
|
||||
#include <Python.h>
|
||||
#include "structmember.h"
|
||||
|
||||
// for shm_open() and shm_unlink()
|
||||
#ifdef HAVE_SYS_MMAN_H
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#endif
|
||||
|
||||
#include "Python.h"
|
||||
#include "structmember.h"
|
||||
#include "structmember.h" // PyMemberDef
|
||||
|
||||
PyDoc_STRVAR(pickle_module_doc,
|
||||
"Optimized C implementation for the Python pickle module.");
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "Python.h"
|
||||
#include "structmember.h" /* offsetof */
|
||||
#include <stddef.h> // offsetof()
|
||||
|
||||
/*[clinic input]
|
||||
module _queue
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
#include "cache.h"
|
||||
#include "module.h"
|
||||
#include "structmember.h"
|
||||
#include "structmember.h" // PyMemberDef
|
||||
#include "connection.h"
|
||||
#include "statement.h"
|
||||
#include "cursor.h"
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
*/
|
||||
|
||||
#include <Python.h>
|
||||
#include <structmember.h>
|
||||
|
||||
#include "cursor.h"
|
||||
#include "microprotocols.h"
|
||||
|
|
|
@ -41,7 +41,7 @@ static const char copyright[] =
|
|||
#define PY_SSIZE_T_CLEAN
|
||||
|
||||
#include "Python.h"
|
||||
#include "structmember.h" /* offsetof */
|
||||
#include "structmember.h" // PyMemberDef
|
||||
|
||||
#include "sre.h"
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
/* statistics accelerator C extension: _statistics module. */
|
||||
|
||||
#include "Python.h"
|
||||
#include "structmember.h"
|
||||
#include "clinic/_statisticsmodule.c.h"
|
||||
|
||||
/*[clinic input]
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#define PY_SSIZE_T_CLEAN
|
||||
|
||||
#include "Python.h"
|
||||
#include "structmember.h"
|
||||
#include "structmember.h" // PyMemberDef
|
||||
#include <ctype.h>
|
||||
|
||||
/*[clinic input]
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include "Python.h"
|
||||
#include "datetime.h"
|
||||
#include "marshal.h"
|
||||
#include "structmember.h"
|
||||
#include "structmember.h" // PyMemberDef
|
||||
#include <float.h>
|
||||
#include <signal.h>
|
||||
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
|
||||
#include "Python.h"
|
||||
#include "pycore_pylifecycle.h"
|
||||
#include "pycore_interp.h" // _PyInterpreterState.num_threads
|
||||
#include "pycore_pystate.h" // _PyThreadState_Init()
|
||||
#include <stddef.h> // offsetof()
|
||||
#include "pycore_interp.h" // _PyInterpreterState.num_threads
|
||||
#include "pycore_pystate.h" // _PyThreadState_Init()
|
||||
#include <stddef.h> // offsetof()
|
||||
|
||||
static PyObject *ThreadError;
|
||||
static PyObject *str_dict;
|
||||
|
@ -587,8 +587,6 @@ newlockobject(void)
|
|||
|
||||
/* Thread-local objects */
|
||||
|
||||
#include "structmember.h"
|
||||
|
||||
/* Quick overview:
|
||||
|
||||
We need to be able to reclaim reference cycles as soon as possible
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
/* See http://www.python.org/2.4/license for licensing details. */
|
||||
|
||||
#include "Python.h"
|
||||
#include "structmember.h"
|
||||
#include "structmember.h" // PyMemberDef
|
||||
|
||||
#define WINDOWS_LEAN_AND_MEAN
|
||||
#include "windows.h"
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include "Python.h"
|
||||
#include "structmember.h"
|
||||
#include <stddef.h> // offsetof()
|
||||
|
||||
#ifdef STDC_HEADERS
|
||||
#include <stddef.h>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include "Python.h"
|
||||
#include "structmember.h"
|
||||
#include "structmember.h" // PyMemberDef
|
||||
#include "multibytecodec.h"
|
||||
#include "clinic/multibytecodec.c.h"
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#define PY_SSIZE_T_CLEAN
|
||||
#include "Python.h"
|
||||
#include "pycore_tupleobject.h"
|
||||
#include "structmember.h"
|
||||
#include <stddef.h> // offsetof()
|
||||
|
||||
/* Itertools module written and maintained
|
||||
by Raymond D. Hettinger <python@rcn.com>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include <Python.h>
|
||||
#include "structmember.h"
|
||||
#include <stddef.h> // offsetof()
|
||||
|
||||
#ifndef MS_WINDOWS
|
||||
#define UNIX
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include "Python.h"
|
||||
#include "structmember.h"
|
||||
#include "structmember.h" // PyMemberDef
|
||||
|
||||
#ifdef HAVE_FCNTL_H
|
||||
#include <fcntl.h>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
Check itemsize */
|
||||
|
||||
#include "Python.h"
|
||||
#include "structmember.h"
|
||||
#include "structmember.h" // PyMemberDef
|
||||
|
||||
#define WINDOWS_LEAN_AND_MEAN
|
||||
#include <winsock2.h>
|
||||
|
|
|
@ -35,10 +35,10 @@
|
|||
# include <windows.h>
|
||||
#endif
|
||||
|
||||
#include "pycore_ceval.h" /* _PyEval_ReInitThreads() */
|
||||
#include "pycore_import.h" /* _PyImport_ReInitLock() */
|
||||
#include "pycore_pystate.h" /* _PyInterpreterState_GET() */
|
||||
#include "structmember.h"
|
||||
#include "pycore_ceval.h" // _PyEval_ReInitThreads()
|
||||
#include "pycore_import.h" // _PyImport_ReInitLock()
|
||||
#include "pycore_pystate.h" // _PyInterpreterState_GET()
|
||||
#include "structmember.h" // PyMemberDef
|
||||
#ifndef MS_WINDOWS
|
||||
# include "posixmodule.h"
|
||||
#else
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include "Python.h"
|
||||
#include <ctype.h>
|
||||
|
||||
#include "structmember.h"
|
||||
#include "structmember.h" // PyMemberDef
|
||||
#include "frameobject.h"
|
||||
#include "expat.h"
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#endif
|
||||
|
||||
#include "Python.h"
|
||||
#include <structmember.h>
|
||||
#include "structmember.h" // PyMemberDef
|
||||
|
||||
#ifdef HAVE_SYS_DEVPOLL_H
|
||||
#include <sys/resource.h>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
/* SHA objects */
|
||||
|
||||
#include "Python.h"
|
||||
#include "structmember.h"
|
||||
#include "structmember.h" // PyMemberDef
|
||||
#include "hashlib.h"
|
||||
#include "pystrhex.h"
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
/* SHA objects */
|
||||
|
||||
#include "Python.h"
|
||||
#include "structmember.h"
|
||||
#include "structmember.h" // PyMemberDef
|
||||
#include "hashlib.h"
|
||||
#include "pystrhex.h"
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ Local naming conventions:
|
|||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include "Python.h"
|
||||
#include "structmember.h"
|
||||
#include "structmember.h" // PyMemberDef
|
||||
|
||||
#ifdef _Py_MEMORY_SANITIZER
|
||||
# include <sanitizer/msan_interface.h>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
#include "Python.h"
|
||||
#include "ucnhash.h"
|
||||
#include "structmember.h"
|
||||
#include "structmember.h" // PyMemberDef
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "Python.h"
|
||||
#include "structmember.h"
|
||||
#include "structmember.h" // PyMemberDef
|
||||
|
||||
PyDoc_STRVAR(xxsubtype__doc__,
|
||||
"xxsubtype is an example module showing how to subtype builtin types from C.\n"
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#define PY_SSIZE_T_CLEAN
|
||||
|
||||
#include "Python.h"
|
||||
#include "structmember.h"
|
||||
#include "structmember.h" // PyMemberDef
|
||||
#include "zlib.h"
|
||||
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
/* Abstract Object Interface (many thanks to Jim Fulton) */
|
||||
|
||||
#include "Python.h"
|
||||
#include "pycore_abstract.h" // _PyIndex_Check()
|
||||
#include "pycore_ceval.h" // _Py_EnterRecursiveCall()
|
||||
#include "pycore_abstract.h" // _PyIndex_Check()
|
||||
#include "pycore_ceval.h" // _Py_EnterRecursiveCall()
|
||||
#include "pycore_pyerrors.h"
|
||||
#include "pycore_pystate.h" // _PyThreadState_GET()
|
||||
#include "pycore_pystate.h" // _PyThreadState_GET()
|
||||
#include <ctype.h>
|
||||
#include "structmember.h" /* we need the offsetof() macro from there */
|
||||
#include <stddef.h> // offsetof()
|
||||
#include "longintrepr.h"
|
||||
|
||||
|
||||
|
|
|
@ -2,11 +2,10 @@
|
|||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include "Python.h"
|
||||
#include "pycore_abstract.h" // _PyIndex_Check()
|
||||
#include "pycore_abstract.h" // _PyIndex_Check()
|
||||
#include "pycore_bytes_methods.h"
|
||||
#include "pycore_object.h"
|
||||
#include "pycore_pymem.h"
|
||||
#include "structmember.h"
|
||||
#include "bytesobject.h"
|
||||
#include "pystrhex.h"
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
#include "pycore_object.h"
|
||||
#include "pycore_pyerrors.h"
|
||||
#include "pycore_pymem.h"
|
||||
#include "pycore_pystate.h" // _PyThreadState_GET()
|
||||
#include "structmember.h"
|
||||
#include "pycore_pystate.h" // _PyThreadState_GET()
|
||||
#include "structmember.h" // PyMemberDef
|
||||
|
||||
#define TP_DESCR_GET(t) ((t)->tp_descr_get)
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include "Python.h"
|
||||
#include "code.h"
|
||||
#include "opcode.h"
|
||||
#include "structmember.h"
|
||||
#include "structmember.h" // PyMemberDef
|
||||
#include "pycore_code.h"
|
||||
#include "pycore_interp.h" // PyInterpreterState.co_extra_freefuncs
|
||||
#include "pycore_pystate.h" // _PyInterpreterState_GET()
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
/* Submitted by Jim Hugunin */
|
||||
|
||||
#include "Python.h"
|
||||
#include "structmember.h"
|
||||
#include "structmember.h" // PyMemberDef
|
||||
|
||||
/*[clinic input]
|
||||
class complex "PyComplexObject *" "&PyComplex_Type"
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include "pycore_object.h"
|
||||
#include "pycore_pystate.h" // _PyThreadState_GET()
|
||||
#include "pycore_tupleobject.h"
|
||||
#include "structmember.h" /* Why is this not included in Python.h? */
|
||||
#include "structmember.h" // PyMemberDef
|
||||
|
||||
_Py_IDENTIFIER(getattr);
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include "pycore_initconfig.h"
|
||||
#include "pycore_object.h"
|
||||
#include "pycore_pymem.h"
|
||||
#include "structmember.h"
|
||||
#include "structmember.h" // PyMemberDef
|
||||
#include "osdefs.h"
|
||||
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include "code.h"
|
||||
#include "frameobject.h"
|
||||
#include "opcode.h"
|
||||
#include "structmember.h"
|
||||
#include "structmember.h" // PyMemberDef
|
||||
|
||||
#define OFF(x) offsetof(PyFrameObject, x)
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include "pycore_pymem.h"
|
||||
#include "pycore_tupleobject.h"
|
||||
#include "code.h"
|
||||
#include "structmember.h"
|
||||
#include "structmember.h" // PyMemberDef
|
||||
|
||||
PyObject *
|
||||
PyFunction_NewWithQualName(PyObject *code, PyObject *globals, PyObject *qualname)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#include "Python.h"
|
||||
#include "pycore_object.h"
|
||||
#include "structmember.h"
|
||||
#include "structmember.h" // PyMemberDef
|
||||
|
||||
typedef struct {
|
||||
PyObject_HEAD
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
/* Generator object implementation */
|
||||
|
||||
#include "Python.h"
|
||||
#include "pycore_ceval.h" // _PyEval_EvalFrame()
|
||||
#include "pycore_ceval.h" // _PyEval_EvalFrame()
|
||||
#include "pycore_object.h"
|
||||
#include "pycore_pystate.h" // _PyThreadState_GET()
|
||||
#include "pycore_pystate.h" // _PyThreadState_GET()
|
||||
#include "frameobject.h"
|
||||
#include "structmember.h"
|
||||
#include "structmember.h" // PyMemberDef
|
||||
#include "opcode.h"
|
||||
|
||||
static PyObject *gen_close(PyGenObject *, PyObject *);
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
/* Method object implementation */
|
||||
|
||||
#include "Python.h"
|
||||
#include "pycore_ceval.h" // _Py_EnterRecursiveCall()
|
||||
#include "pycore_ceval.h" // _Py_EnterRecursiveCall()
|
||||
#include "pycore_object.h"
|
||||
#include "pycore_pyerrors.h"
|
||||
#include "pycore_pymem.h"
|
||||
#include "pycore_pystate.h" // _PyThreadState_GET()
|
||||
#include "structmember.h"
|
||||
#include "pycore_pystate.h" // _PyThreadState_GET()
|
||||
#include "structmember.h" // PyMemberDef
|
||||
|
||||
/* undefine macro trampoline to PyCFunction_NewEx */
|
||||
#undef PyCFunction_New
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
/* Module object implementation */
|
||||
|
||||
#include "Python.h"
|
||||
#include "pycore_interp.h" // PyInterpreterState.importlib
|
||||
#include "pycore_pystate.h" // _PyInterpreterState_GET()
|
||||
#include "structmember.h"
|
||||
#include "pycore_interp.h" // PyInterpreterState.importlib
|
||||
#include "pycore_pystate.h" // _PyInterpreterState_GET()
|
||||
#include "structmember.h" // PyMemberDef
|
||||
|
||||
static Py_ssize_t max_module_number;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// namespace object implementation
|
||||
|
||||
#include "Python.h"
|
||||
#include "structmember.h"
|
||||
#include "structmember.h" // PyMemberDef
|
||||
|
||||
|
||||
typedef struct {
|
||||
|
|
|
@ -466,7 +466,7 @@ later:
|
|||
|
||||
#include "Python.h"
|
||||
#include "pycore_object.h"
|
||||
#include "structmember.h"
|
||||
#include <stddef.h> // offsetof()
|
||||
#include "dict-common.h"
|
||||
#include <stddef.h>
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include "Python.h"
|
||||
#include "pycore_abstract.h" // _PyIndex_Check()
|
||||
#include "pycore_tupleobject.h"
|
||||
#include "structmember.h"
|
||||
#include "structmember.h" // PyMemberDef
|
||||
|
||||
/* Support objects whose length is > PY_SSIZE_T_MAX.
|
||||
|
||||
|
|
|
@ -32,8 +32,8 @@
|
|||
*/
|
||||
|
||||
#include "Python.h"
|
||||
#include "pycore_object.h" // _PyObject_GC_UNTRACK()
|
||||
#include "structmember.h"
|
||||
#include "pycore_object.h" // _PyObject_GC_UNTRACK()
|
||||
#include <stddef.h> // offsetof()
|
||||
|
||||
/* Object used as dummy key to fill deleted entries */
|
||||
static PyObject _dummy_struct;
|
||||
|
|
|
@ -14,10 +14,10 @@ this type and there is exactly one in existence.
|
|||
*/
|
||||
|
||||
#include "Python.h"
|
||||
#include "pycore_abstract.h" // _PyIndex_Check()
|
||||
#include "pycore_abstract.h" // _PyIndex_Check()
|
||||
#include "pycore_object.h"
|
||||
#include "pycore_pymem.h"
|
||||
#include "structmember.h"
|
||||
#include "structmember.h" // PyMemberDef
|
||||
|
||||
static PyObject *
|
||||
ellipsis_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include "Python.h"
|
||||
#include "pycore_tupleobject.h"
|
||||
#include "pycore_object.h"
|
||||
#include "structmember.h"
|
||||
#include "structmember.h" // PyMemberDef
|
||||
|
||||
static const char visible_length_key[] = "n_sequence_fields";
|
||||
static const char real_length_key[] = "n_fields";
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
#include "pycore_initconfig.h"
|
||||
#include "pycore_object.h"
|
||||
#include "pycore_pyerrors.h"
|
||||
#include "pycore_pystate.h" // _PyThreadState_GET()
|
||||
#include "pycore_pystate.h" // _PyThreadState_GET()
|
||||
#include "frameobject.h"
|
||||
#include "structmember.h"
|
||||
#include "structmember.h" // PyMemberDef
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "Python.h"
|
||||
#include "pycore_object.h" // _PyObject_GET_WEAKREFS_LISTPTR
|
||||
#include "structmember.h"
|
||||
#include "pycore_object.h" // _PyObject_GET_WEAKREFS_LISTPTR()
|
||||
#include "structmember.h" // PyMemberDef
|
||||
|
||||
|
||||
#define GET_WEAKREFS_LISTPTR(o) \
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include "Python.h"
|
||||
#include "structmember.h"
|
||||
#include "windows.h"
|
||||
#include "structmember.h" // PyMemberDef
|
||||
#include <windows.h>
|
||||
|
||||
static BOOL PyHKEY_AsHKEY(PyObject *ob, HKEY *pRes, BOOL bNoneOK);
|
||||
static BOOL clinic_HKEY_converter(PyObject *ob, void *p);
|
||||
|
|
|
@ -1428,7 +1428,7 @@ def main(srcfile, dump_module=False):
|
|||
f.write('\n')
|
||||
f.write('#include "Python.h"\n')
|
||||
f.write('#include "%s-ast.h"\n' % mod.name)
|
||||
f.write('#include "structmember.h"\n')
|
||||
f.write('#include "structmember.h" // PyMemberDef\n')
|
||||
f.write('\n')
|
||||
|
||||
generate_module_def(f, mod)
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
#include "Python.h"
|
||||
#include "Python-ast.h"
|
||||
#include "structmember.h"
|
||||
#include "structmember.h" // PyMemberDef
|
||||
|
||||
typedef struct {
|
||||
int initialized;
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
#include "opcode.h"
|
||||
#include "pydtrace.h"
|
||||
#include "setobject.h"
|
||||
#include "structmember.h"
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include "pycore_object.h"
|
||||
#include "pycore_pyerrors.h"
|
||||
#include "pycore_pystate.h" // _PyThreadState_GET()
|
||||
#include "structmember.h"
|
||||
#include "structmember.h" // PyMemberDef
|
||||
|
||||
|
||||
#define CONTEXT_FREELIST_MAXLEN 255
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#include "Python.h"
|
||||
|
||||
#include "pycore_hamt.h"
|
||||
#include "pycore_object.h" // _PyObject_GC_TRACK()
|
||||
#include "structmember.h"
|
||||
#include "pycore_object.h" // _PyObject_GC_TRACK()
|
||||
#include <stddef.h> // offsetof()
|
||||
|
||||
/*
|
||||
This file provides an implementation of an immutable mapping using the
|
||||
|
|
|
@ -2,8 +2,7 @@
|
|||
/* Map C struct members to Python object attributes */
|
||||
|
||||
#include "Python.h"
|
||||
|
||||
#include "structmember.h"
|
||||
#include "structmember.h" // PyMemberDef
|
||||
|
||||
PyObject *
|
||||
PyMember_GetOne(const char *addr, PyMemberDef *l)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include "pycore_pystate.h" // _PyThreadState_GET()
|
||||
#include "symtable.h"
|
||||
#undef Yield /* undefine macro conflicting with <winbase.h> */
|
||||
#include "structmember.h"
|
||||
#include "structmember.h" // PyMemberDef
|
||||
|
||||
/* error strings used for warnings */
|
||||
#define GLOBAL_PARAM \
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
#include "code.h"
|
||||
#include "frameobject.h"
|
||||
#include "structmember.h"
|
||||
#include "structmember.h" // PyMemberDef
|
||||
#include "osdefs.h"
|
||||
#ifdef HAVE_FCNTL_H
|
||||
#include <fcntl.h>
|
||||
|
|
Loading…
Reference in New Issue