From 00d7abd7ef588fc4ff0571c8579ab4aba8ada1c0 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 1 Dec 2020 09:56:42 +0100 Subject: bpo-42519: Replace PyMem_MALLOC() with PyMem_Malloc() (GH-23586) No longer use deprecated aliases to functions: * Replace PyMem_MALLOC() with PyMem_Malloc() * Replace PyMem_REALLOC() with PyMem_Realloc() * Replace PyMem_FREE() with PyMem_Free() * Replace PyMem_Del() with PyMem_Free() * Replace PyMem_DEL() with PyMem_Free() Modify also the PyMem_DEL() macro to use directly PyMem_Free(). --- Python/traceback.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Python/traceback.c') diff --git a/Python/traceback.c b/Python/traceback.c index 99b63af11f..708678facf 100644 --- a/Python/traceback.c +++ b/Python/traceback.c @@ -419,12 +419,12 @@ _Py_DisplaySourceLine(PyObject *f, PyObject *filename, int lineno, int indent) if (lseek(fd, 0, SEEK_SET) == (off_t)-1) { Py_DECREF(io); Py_DECREF(binary); - PyMem_FREE(found_encoding); + PyMem_Free(found_encoding); return 0; } fob = _PyObject_CallMethodId(io, &PyId_TextIOWrapper, "Os", binary, encoding); Py_DECREF(io); - PyMem_FREE(found_encoding); + PyMem_Free(found_encoding); if (fob == NULL) { PyErr_Clear(); -- cgit v1.2.1 From 40125ab3252453bf205ed906e46bf9741c27bf9d Mon Sep 17 00:00:00 2001 From: Irit Katriel Date: Thu, 17 Dec 2020 12:33:07 +0000 Subject: bpo-26564: fix obsolete comment in traceback.c (GH-23819) --- Python/traceback.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Python/traceback.c') diff --git a/Python/traceback.c b/Python/traceback.c index 708678facf..b82cfd3665 100644 --- a/Python/traceback.c +++ b/Python/traceback.c @@ -622,7 +622,8 @@ PyTraceBack_Print(PyObject *v, PyObject *f) return err; } -/* Reverse a string. For example, "abcd" becomes "dcba". +/* Format an integer in range [0; 0xffffffff] to decimal and write it + into the file fd. This function is signal safe. */ -- cgit v1.2.1