diff options
author | Victor Stinner <vstinner@python.org> | 2023-07-02 00:49:18 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-02 00:49:18 (GMT) |
commit | feb51f3a6443d7c0148e2e7be2ed58b4c69fa265 (patch) | |
tree | 370ec2982ab329ad0159fe6b4ffdaea541984468 /Modules/_testcapi | |
parent | 18b1fdebe0cd5e601aa341227c13ec9d89bdf32c (diff) | |
download | cpython-feb51f3a6443d7c0148e2e7be2ed58b4c69fa265.zip cpython-feb51f3a6443d7c0148e2e7be2ed58b4c69fa265.tar.gz cpython-feb51f3a6443d7c0148e2e7be2ed58b4c69fa265.tar.bz2 |
gh-106320: Remove private _PyTraceMalloc C API functions (#106324)
* Remove private _PyTraceMalloc C API functions: move them to the
internal C API.
* Don't export most of these functions anymore, but still export
_PyTraceMalloc_GetTraceback() used by tests.
* Rename Include/tracemalloc.h to Include/cpython/tracemalloc.h
Diffstat (limited to 'Modules/_testcapi')
-rw-r--r-- | Modules/_testcapi/mem.c | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/Modules/_testcapi/mem.c b/Modules/_testcapi/mem.c index af32e96..16bda66 100644 --- a/Modules/_testcapi/mem.c +++ b/Modules/_testcapi/mem.c @@ -655,23 +655,6 @@ tracemalloc_untrack(PyObject *self, PyObject *args) Py_RETURN_NONE; } -static PyObject * -tracemalloc_get_traceback(PyObject *self, PyObject *args) -{ - unsigned int domain; - PyObject *ptr_obj; - - if (!PyArg_ParseTuple(args, "IO", &domain, &ptr_obj)) { - return NULL; - } - void *ptr = PyLong_AsVoidPtr(ptr_obj); - if (PyErr_Occurred()) { - return NULL; - } - - return _PyTraceMalloc_GetTraceback(domain, (uintptr_t)ptr); -} - static PyMethodDef test_methods[] = { {"check_pyobject_forbidden_bytes_is_freed", check_pyobject_forbidden_bytes_is_freed, METH_NOARGS}, @@ -697,7 +680,6 @@ static PyMethodDef test_methods[] = { // Tracemalloc tests {"tracemalloc_track", tracemalloc_track, METH_VARARGS}, {"tracemalloc_untrack", tracemalloc_untrack, METH_VARARGS}, - {"tracemalloc_get_traceback", tracemalloc_get_traceback, METH_VARARGS}, {NULL}, }; |