summaryrefslogtreecommitdiffstats
path: root/Objects/bytesobject.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-02-03 14:17:15 (GMT)
committerGitHub <noreply@github.com>2020-02-03 14:17:15 (GMT)
commitc6e5c1123bac6cbb4c85265155af5349dcea522e (patch)
treec9bc04bdd74fbf9d8f86dd1999d8acc0f4655fc3 /Objects/bytesobject.c
parent869c0c99b94ff9527acc1ca060164ab3d1bdcc53 (diff)
downloadcpython-c6e5c1123bac6cbb4c85265155af5349dcea522e.zip
cpython-c6e5c1123bac6cbb4c85265155af5349dcea522e.tar.gz
cpython-c6e5c1123bac6cbb4c85265155af5349dcea522e.tar.bz2
bpo-39489: Remove COUNT_ALLOCS special build (GH-18259)
Remove: * COUNT_ALLOCS macro * sys.getcounts() function * SHOW_ALLOC_COUNT code in listobject.c * SHOW_TRACK_COUNT code in tupleobject.c * PyConfig.show_alloc_count field * -X showalloccount command line option * @test.support.requires_type_collecting decorator
Diffstat (limited to 'Objects/bytesobject.c')
-rw-r--r--Objects/bytesobject.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c
index 5fd92f7..00151b8 100644
--- a/Objects/bytesobject.c
+++ b/Objects/bytesobject.c
@@ -18,10 +18,6 @@ class bytes "PyBytesObject *" "&PyBytes_Type"
#include "clinic/bytesobject.c.h"
-#ifdef COUNT_ALLOCS
-Py_ssize_t _Py_null_strings, _Py_one_strings;
-#endif
-
static PyBytesObject *characters[UCHAR_MAX + 1];
static PyBytesObject *nullstring;
@@ -68,9 +64,6 @@ _PyBytes_FromSize(Py_ssize_t size, int use_calloc)
assert(size >= 0);
if (size == 0 && (op = nullstring) != NULL) {
-#ifdef COUNT_ALLOCS
- _Py_null_strings++;
-#endif
Py_INCREF(op);
return (PyObject *)op;
}
@@ -112,9 +105,6 @@ PyBytes_FromStringAndSize(const char *str, Py_ssize_t size)
if (size == 1 && str != NULL &&
(op = characters[*str & UCHAR_MAX]) != NULL)
{
-#ifdef COUNT_ALLOCS
- _Py_one_strings++;
-#endif
Py_INCREF(op);
return (PyObject *)op;
}
@@ -148,16 +138,10 @@ PyBytes_FromString(const char *str)
return NULL;
}
if (size == 0 && (op = nullstring) != NULL) {
-#ifdef COUNT_ALLOCS
- _Py_null_strings++;
-#endif
Py_INCREF(op);
return (PyObject *)op;
}
if (size == 1 && (op = characters[*str & UCHAR_MAX]) != NULL) {
-#ifdef COUNT_ALLOCS
- _Py_one_strings++;
-#endif
Py_INCREF(op);
return (PyObject *)op;
}