summaryrefslogtreecommitdiffstats
path: root/Objects/bytesobject.c
diff options
context:
space:
mode:
authorPablo Galindo <Pablogsal@gmail.com>2018-10-28 15:02:17 (GMT)
committerGitHub <noreply@github.com>2018-10-28 15:02:17 (GMT)
commit49c75a8086c3df9add0779d2479b8f09b95cdf3b (patch)
tree85cc8a1eb5d6a8140a69037cdf9ab11c3ecc601f /Objects/bytesobject.c
parent6015cc50bc38b9e920ce4986ee10658eaa14f561 (diff)
downloadcpython-49c75a8086c3df9add0779d2479b8f09b95cdf3b.zip
cpython-49c75a8086c3df9add0779d2479b8f09b95cdf3b.tar.gz
cpython-49c75a8086c3df9add0779d2479b8f09b95cdf3b.tar.bz2
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.
Diffstat (limited to 'Objects/bytesobject.c')
-rw-r--r--Objects/bytesobject.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c
index 9a08814..1b36661 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;