diff options
| author | Victor Stinner <vstinner@python.org> | 2020-02-03 14:17:15 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-03 14:17:15 (GMT) |
| commit | c6e5c1123bac6cbb4c85265155af5349dcea522e (patch) | |
| tree | c9bc04bdd74fbf9d8f86dd1999d8acc0f4655fc3 /Objects/longobject.c | |
| parent | 869c0c99b94ff9527acc1ca060164ab3d1bdcc53 (diff) | |
| download | cpython-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/longobject.c')
| -rw-r--r-- | Objects/longobject.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/Objects/longobject.c b/Objects/longobject.c index 124b837..9115fa1 100644 --- a/Objects/longobject.c +++ b/Objects/longobject.c @@ -35,10 +35,6 @@ PyObject *_PyLong_One = NULL; #define IS_SMALL_INT(ival) (-NSMALLNEGINTS <= (ival) && (ival) < NSMALLPOSINTS) #define IS_SMALL_UINT(ival) ((ival) < NSMALLPOSINTS) -#ifdef COUNT_ALLOCS -Py_ssize_t _Py_quick_int_allocs, _Py_quick_neg_int_allocs; -#endif - static PyObject * get_small_int(sdigit ival) { @@ -46,12 +42,6 @@ get_small_int(sdigit ival) PyThreadState *tstate = _PyThreadState_GET(); PyObject *v = (PyObject*)tstate->interp->small_ints[ival + NSMALLNEGINTS]; Py_INCREF(v); -#ifdef COUNT_ALLOCS - if (ival >= 0) - _Py_quick_int_allocs++; - else - _Py_quick_neg_int_allocs++; -#endif return v; } |
