From 49c75a8086c3df9add0779d2479b8f09b95cdf3b Mon Sep 17 00:00:00 2001 From: Pablo Galindo Date: Sun, 28 Oct 2018 15:02:17 +0000 Subject: 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. --- Objects/bytesobject.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Objects/bytesobject.c') diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c index 9a0881450c..1b36661c84 100644 --- a/Objects/bytesobject.c +++ b/Objects/bytesobject.c @@ -18,7 +18,7 @@ class bytes "PyBytesObject *" "&PyBytes_Type" #include "clinic/bytesobject.c.h" #ifdef COUNT_ALLOCS -Py_ssize_t null_strings, one_strings; +Py_ssize_t _Py_null_strings, _Py_one_strings; #endif static PyBytesObject *characters[UCHAR_MAX + 1]; @@ -66,7 +66,7 @@ _PyBytes_FromSize(Py_ssize_t size, int use_calloc) if (size == 0 && (op = nullstring) != NULL) { #ifdef COUNT_ALLOCS - null_strings++; + _Py_null_strings++; #endif Py_INCREF(op); return (PyObject *)op; @@ -110,7 +110,7 @@ PyBytes_FromStringAndSize(const char *str, Py_ssize_t size) (op = characters[*str & UCHAR_MAX]) != NULL) { #ifdef COUNT_ALLOCS - one_strings++; + _Py_one_strings++; #endif Py_INCREF(op); return (PyObject *)op; @@ -146,14 +146,14 @@ PyBytes_FromString(const char *str) } if (size == 0 && (op = nullstring) != NULL) { #ifdef COUNT_ALLOCS - null_strings++; + _Py_null_strings++; #endif Py_INCREF(op); return (PyObject *)op; } if (size == 1 && (op = characters[*str & UCHAR_MAX]) != NULL) { #ifdef COUNT_ALLOCS - one_strings++; + _Py_one_strings++; #endif Py_INCREF(op); return (PyObject *)op; -- cgit v1.2.1