From e46bb99a184572fc5db883d4241d0474eef3a184 Mon Sep 17 00:00:00 2001 From: chgnrdv Date: Fri, 9 Sep 2022 18:24:31 +0300 Subject: [PATCH 1/3] gh-96715 Remove redundant NULL check in profile_trampoline function (sysmodule.c) Fixes #96715 --- Python/sysmodule.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Python/sysmodule.c b/Python/sysmodule.c index 653b5a55e885e5..6f2c41f1d1ccb9 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -951,10 +951,6 @@ static int profile_trampoline(PyObject *self, PyFrameObject *frame, int what, PyObject *arg) { - if (arg == NULL) { - arg = Py_None; - } - PyThreadState *tstate = _PyThreadState_GET(); PyObject *result = call_trampoline(tstate, self, frame, what, arg); if (result == NULL) { From 7e967dc68d0f0b34346322dec1f4e7cfb2e41060 Mon Sep 17 00:00:00 2001 From: "blurb-it[bot]" <43283697+blurb-it[bot]@users.noreply.github.com> Date: Fri, 9 Sep 2022 15:58:24 +0000 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=93=9C=F0=9F=A4=96=20Added=20by=20blu?= =?UTF-8?q?rb=5Fit.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../2022-09-09-15-58-23.gh-issue-96715.NgQeic.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/Core and Builtins/2022-09-09-15-58-23.gh-issue-96715.NgQeic.rst diff --git a/Misc/NEWS.d/next/Core and Builtins/2022-09-09-15-58-23.gh-issue-96715.NgQeic.rst b/Misc/NEWS.d/next/Core and Builtins/2022-09-09-15-58-23.gh-issue-96715.NgQeic.rst new file mode 100644 index 00000000000000..fc40ab00715906 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2022-09-09-15-58-23.gh-issue-96715.NgQeic.rst @@ -0,0 +1 @@ +Removed excess NULL check in :c:func:`profile_trampoline` function which is used in :func:`sys.setprofile`. From cd8a1e8ffde7e85b2dd61931304afde41b8e23c3 Mon Sep 17 00:00:00 2001 From: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> Date: Sat, 10 Dec 2022 22:29:33 +0530 Subject: [PATCH 3/3] Delete 2022-09-09-15-58-23.gh-issue-96715.NgQeic.rst --- .../2022-09-09-15-58-23.gh-issue-96715.NgQeic.rst | 1 - 1 file changed, 1 deletion(-) delete mode 100644 Misc/NEWS.d/next/Core and Builtins/2022-09-09-15-58-23.gh-issue-96715.NgQeic.rst diff --git a/Misc/NEWS.d/next/Core and Builtins/2022-09-09-15-58-23.gh-issue-96715.NgQeic.rst b/Misc/NEWS.d/next/Core and Builtins/2022-09-09-15-58-23.gh-issue-96715.NgQeic.rst deleted file mode 100644 index fc40ab00715906..00000000000000 --- a/Misc/NEWS.d/next/Core and Builtins/2022-09-09-15-58-23.gh-issue-96715.NgQeic.rst +++ /dev/null @@ -1 +0,0 @@ -Removed excess NULL check in :c:func:`profile_trampoline` function which is used in :func:`sys.setprofile`.