From 984db774695f5488528957c616254f9a365f1f58 Mon Sep 17 00:00:00 2001 From: Pieter Eendebak Date: Sun, 22 Dec 2024 20:46:43 +0100 Subject: [PATCH] cleanup --- Include/cpython/object.h | 1 - Include/internal/pycore_obmalloc.h | 1 + Include/object.h | 1 + Include/objimpl.h | 1 - Include/pystats.h | 3 --- .../Windows/2024-12-16-16-16-35.gh-issue-127951.lpE13-.rst | 1 - 6 files changed, 2 insertions(+), 6 deletions(-) delete mode 100644 Misc/NEWS.d/next/Windows/2024-12-16-16-16-35.gh-issue-127951.lpE13-.rst diff --git a/Include/cpython/object.h b/Include/cpython/object.h index 6ebda99a5e2d7b..e4797029da431e 100644 --- a/Include/cpython/object.h +++ b/Include/cpython/object.h @@ -6,7 +6,6 @@ PyAPI_FUNC(void) _Py_NewReference(PyObject *op); PyAPI_FUNC(void) _Py_NewReferenceNoTotal(PyObject *op); PyAPI_FUNC(void) _Py_ResurrectReference(PyObject *op); - #ifdef Py_REF_DEBUG /* These are useful as debugging aids when chasing down refleaks. */ PyAPI_FUNC(Py_ssize_t) _Py_GetGlobalRefTotal(void); diff --git a/Include/internal/pycore_obmalloc.h b/Include/internal/pycore_obmalloc.h index ae224a63b4d9dd..7d6bf710812eb8 100644 --- a/Include/internal/pycore_obmalloc.h +++ b/Include/internal/pycore_obmalloc.h @@ -16,6 +16,7 @@ typedef unsigned int pymem_uint; /* assuming >= 16 bits */ void OBJECT_STAT_INCREMENT(const char *tag); void OBJECT_STAT_FREELIST_INCREMENT(const char *tag); +void OBJECT_STAT_ALLOCATION_TYPE(PyTypeObject *tp); /* An object allocator for Python. diff --git a/Include/object.h b/Include/object.h index f60cb3ccfbed24..da7b3668c033f4 100644 --- a/Include/object.h +++ b/Include/object.h @@ -4,6 +4,7 @@ extern "C" { #endif + /* Object and type object interface */ /* diff --git a/Include/objimpl.h b/Include/objimpl.h index aaa615fceac1aa..56472a72e42d34 100644 --- a/Include/objimpl.h +++ b/Include/objimpl.h @@ -140,7 +140,6 @@ PyAPI_FUNC(PyVarObject *) _PyObject_NewVar(PyTypeObject *, Py_ssize_t); // directly PyObject_MALLOC() with _PyObject_VAR_SIZE(). #define PyObject_NEW_VAR(type, typeobj, n) PyObject_NewVar(type, (typeobj), (n)) -void OBJECT_STAT_ALLOCATION_TYPE(PyTypeObject *tp); /* * Garbage Collection Support diff --git a/Include/pystats.h b/Include/pystats.h index a03f2d6c59f92e..a515570d1bb3bc 100644 --- a/Include/pystats.h +++ b/Include/pystats.h @@ -20,9 +20,6 @@ extern "C" { # define _Py_DECREF_STAT_INC() ((void)0) # define _Py_INCREF_IMMORTAL_STAT_INC() ((void)0) # define _Py_DECREF_IMMORTAL_STAT_INC() ((void)0) - -//# define OBJECT_STAT_INCREMENT() ((void)0) - #endif // !Py_STATS #ifdef __cplusplus diff --git a/Misc/NEWS.d/next/Windows/2024-12-16-16-16-35.gh-issue-127951.lpE13-.rst b/Misc/NEWS.d/next/Windows/2024-12-16-16-16-35.gh-issue-127951.lpE13-.rst deleted file mode 100644 index 8a03c2ac42ae10..00000000000000 --- a/Misc/NEWS.d/next/Windows/2024-12-16-16-16-35.gh-issue-127951.lpE13-.rst +++ /dev/null @@ -1 +0,0 @@ -Add option `--pystats` to the Windows build to enable performance statistics collection.