mirror of
https://github.com/python/cpython.git
synced 2025-08-02 16:13:13 +00:00
bpo-35064 prefix smelly symbols that appear with COUNT_ALLOCS with _Py_ (GH-10152)
Configuring python with ./configure --with-pydebug CFLAGS="-D COUNT_ALLOCS -O0" makes "make smelly" fail as some symbols were being exported without the "Py_" or "_Py" prefixes.
This commit is contained in:
parent
6015cc50bc
commit
49c75a8086
7 changed files with 31 additions and 31 deletions
|
@ -752,10 +752,10 @@ PyAPI_FUNC(void) _PyDebug_PrintTotalRefs(void);
|
|||
#endif /* Py_REF_DEBUG */
|
||||
|
||||
#ifdef COUNT_ALLOCS
|
||||
PyAPI_FUNC(void) inc_count(PyTypeObject *);
|
||||
PyAPI_FUNC(void) dec_count(PyTypeObject *);
|
||||
#define _Py_INC_TPALLOCS(OP) inc_count(Py_TYPE(OP))
|
||||
#define _Py_INC_TPFREES(OP) dec_count(Py_TYPE(OP))
|
||||
PyAPI_FUNC(void) _Py_inc_count(PyTypeObject *);
|
||||
PyAPI_FUNC(void) _Py_dec_count(PyTypeObject *);
|
||||
#define _Py_INC_TPALLOCS(OP) _Py_inc_count(Py_TYPE(OP))
|
||||
#define _Py_INC_TPFREES(OP) _Py_dec_count(Py_TYPE(OP))
|
||||
#define _Py_DEC_TPFREES(OP) Py_TYPE(OP)->tp_frees--
|
||||
#define _Py_COUNT_ALLOCS_COMMA ,
|
||||
#else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue