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:
Pablo Galindo 2018-10-28 15:02:17 +00:00 committed by GitHub
parent 6015cc50bc
commit 49c75a8086
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 31 additions and 31 deletions

View file

@ -28,8 +28,8 @@ static PyTupleObject *free_list[PyTuple_MAXSAVESIZE];
static int numfree[PyTuple_MAXSAVESIZE];
#endif
#ifdef COUNT_ALLOCS
Py_ssize_t fast_tuple_allocs;
Py_ssize_t tuple_zero_allocs;
Py_ssize_t _Py_fast_tuple_allocs;
Py_ssize_t _Py_tuple_zero_allocs;
#endif
/* Debug statistic to count GC tracking of tuples.
@ -89,7 +89,7 @@ PyTuple_New(Py_ssize_t size)
op = free_list[0];
Py_INCREF(op);
#ifdef COUNT_ALLOCS
tuple_zero_allocs++;
_Py_tuple_zero_allocs++;
#endif
return (PyObject *) op;
}
@ -97,7 +97,7 @@ PyTuple_New(Py_ssize_t size)
free_list[size] = (PyTupleObject *) op->ob_item[0];
numfree[size]--;
#ifdef COUNT_ALLOCS
fast_tuple_allocs++;
_Py_fast_tuple_allocs++;
#endif
/* Inline PyObject_InitVar */
#ifdef Py_TRACE_REFS