[issue35064] COUNT_ALLOCS build export inc_count() and dec_count() functions which don't have a "Py_" prefix
STINNER Victor
report at bugs.python.org
Thu Oct 25 06:13:55 EDT 2018
New submission from STINNER Victor <vstinner at redhat.com>:
Extract of Include/object.c:
#ifdef COUNT_ALLOCS
PyAPI_FUNC(void) inc_count(PyTypeObject *);
PyAPI_FUNC(void) dec_count(PyTypeObject *);
The "make smelly" fails with 10 symbols:
---
$ ./configure --with-pydebug CFLAGS="-D COUNT_ALLOCS -O0"
$ make smelly
(...)
./python Tools/scripts/smelly.py
+ nm -p libpython3.8dm.a
Ignored symbol types: b, d, r, t
Smelly symbol: dec_count (type: T)
Smelly symbol: dump_counts (type: T)
Smelly symbol: fast_tuple_allocs (type: C)
Smelly symbol: get_counts (type: T)
Smelly symbol: inc_count (type: T)
Smelly symbol: null_strings (type: C)
Smelly symbol: one_strings (type: C)
Smelly symbol: quick_int_allocs (type: C)
Smelly symbol: quick_neg_int_allocs (type: C)
Smelly symbol: tuple_zero_allocs (type: C)
ERROR: Found 10 smelly symbols!
---
These functions should be made private (declared with "static") or get a "Py_" prefix.
----------
components: Interpreter Core
messages: 328422
nosy: vstinner
priority: normal
severity: normal
status: open
versions: Python 3.8
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35064>
_______________________________________
More information about the Python-bugs-list
mailing list