Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions Include/cpython/object.h
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,3 @@ PyAPI_FUNC(int) PyUnstable_TryIncRef(PyObject *);
PyAPI_FUNC(void) PyUnstable_EnableTryIncRef(PyObject *);

PyAPI_FUNC(int) PyUnstable_Object_IsUniquelyReferenced(PyObject *);

/* Utility for the tp_traverse slot of mutable heap types that have no other
* references. */
PyAPI_FUNC(int) _PyObject_VisitType(PyObject *op, visitproc visit, void *arg);
4 changes: 4 additions & 0 deletions Include/internal/pycore_object.h
Original file line number Diff line number Diff line change
Expand Up @@ -1047,6 +1047,10 @@ static inline Py_ALWAYS_INLINE void _Py_INCREF_MORTAL(PyObject *op)
}
#endif

/* Utility for the tp_traverse slot of mutable heap types that have no other
* references. */
PyAPI_FUNC(int) _PyObject_VisitType(PyObject *op, visitproc visit, void *arg);

#ifdef __cplusplus
}
#endif
Expand Down
1 change: 1 addition & 0 deletions Modules/_dbmmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#endif

#include "Python.h"
#include "pycore_object.h" // _PyObject_VisitType()

#include <sys/types.h>
#include <sys/stat.h>
Expand Down
2 changes: 1 addition & 1 deletion Modules/_decimal/_decimal.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
#endif

#include <Python.h>
#include "pycore_object.h" // _PyObject_VisitType()
#include "pycore_pystate.h" // _PyThreadState_GET()
#include "pycore_typeobject.h"
#include "complexobject.h"

#include <mpdecimal.h>

Expand Down
5 changes: 3 additions & 2 deletions Modules/_gdbmmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@
#endif

#include "Python.h"
#include "pycore_pyerrors.h" // _PyErr_SetLocaleString()
#include "pycore_object.h" // _PyObject_VisitType()
#include "pycore_pyerrors.h" // _PyErr_SetLocaleString()
#include "gdbm.h"

#include <fcntl.h>
#include <stdlib.h> // free()
#include <stdlib.h> // free()
#include <sys/stat.h>
#include <sys/types.h>

Expand Down
1 change: 1 addition & 0 deletions Modules/_multiprocessing/semaphore.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*/

#include "multiprocessing.h"
#include "pycore_object.h" // _PyObject_VisitType()

#ifdef HAVE_SYS_TIME_H
# include <sys/time.h> // gettimeofday()
Expand Down
7 changes: 7 additions & 0 deletions Modules/_sqlite/prepare_protocol.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,15 @@
* 3. This notice may not be removed or altered from any source distribution.
*/

#ifndef Py_BUILD_CORE_BUILTIN
# define Py_BUILD_CORE_MODULE 1
#endif

#include "prepare_protocol.h"

#include "pycore_object.h" // _PyObject_VisitType()


static int
pysqlite_prepare_protocol_init(PyObject *self, PyObject *args, PyObject *kwargs)
{
Expand Down
7 changes: 7 additions & 0 deletions Modules/_sqlite/statement.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,17 @@
* 3. This notice may not be removed or altered from any source distribution.
*/

#ifndef Py_BUILD_CORE_BUILTIN
# define Py_BUILD_CORE_MODULE 1
#endif

#include "connection.h"
#include "statement.h"
#include "util.h"

#include "pycore_object.h" // _PyObject_VisitType()


#define _pysqlite_Statement_CAST(op) ((pysqlite_Statement *)(op))

/* prototypes */
Expand Down
5 changes: 3 additions & 2 deletions Modules/blake2module.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@

#include "Python.h"
#include "hashlib.h"
#include "pycore_strhex.h" // _Py_strhex()
#include "pycore_typeobject.h"
#include "pycore_moduleobject.h"
#include "pycore_object.h" // _PyObject_VisitType()
#include "pycore_strhex.h" // _Py_strhex()
#include "pycore_typeobject.h"

// QUICK CPU AUTODETECTION
//
Expand Down
3 changes: 2 additions & 1 deletion Modules/md5module.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
#endif

#include "Python.h"
#include "pycore_strhex.h" // _Py_strhex()
#include "pycore_object.h" // _PyObject_VisitType()
#include "pycore_strhex.h" // _Py_strhex()

#include "hashlib.h"

Expand Down
1 change: 1 addition & 0 deletions Modules/sha1module.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

#include "Python.h"
#include "hashlib.h"
#include "pycore_object.h" // _PyObject_VisitType()
#include "pycore_strhex.h" // _Py_strhex()
#include "pycore_typeobject.h" // _PyType_GetModuleState()

Expand Down
3 changes: 2 additions & 1 deletion Modules/sha2module.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@

#include "Python.h"
#include "pycore_moduleobject.h" // _PyModule_GetState()
#include "pycore_typeobject.h" // _PyType_GetModuleState()
#include "pycore_object.h" // _PyObject_VisitType()
#include "pycore_strhex.h" // _Py_strhex()
#include "pycore_typeobject.h" // _PyType_GetModuleState()

#include "hashlib.h"

Expand Down
1 change: 1 addition & 0 deletions Modules/sha3module.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#endif

#include "Python.h"
#include "pycore_object.h" // _PyObject_VisitType()
#include "pycore_strhex.h" // _Py_strhex()
#include "pycore_typeobject.h" // _PyType_GetModuleState()
#include "hashlib.h"
Expand Down
1 change: 1 addition & 0 deletions Modules/socketmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ Local naming conventions:
#include "pycore_capsule.h" // _PyCapsule_SetTraverse()
#include "pycore_fileutils.h" // _Py_set_inheritable()
#include "pycore_moduleobject.h" // _PyModule_GetState
#include "pycore_object.h" // _PyObject_VisitType()
#include "pycore_time.h" // _PyTime_AsMilliseconds()
#include "pycore_pystate.h" // _Py_AssertHoldsTstate()

Expand Down
1 change: 1 addition & 0 deletions Modules/unicodedata.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#endif

#include "Python.h"
#include "pycore_object.h" // _PyObject_VisitType()
#include "pycore_ucnhash.h" // _PyUnicode_Name_CAPI

#include <stdbool.h>
Expand Down
Loading