]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-126425: Refactor `_lsprof_Profiler_enable` (GH-126426) (#126442)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 5 Nov 2024 12:48:18 +0000 (13:48 +0100)
committerGitHub <noreply@github.com>
Tue, 5 Nov 2024 12:48:18 +0000 (12:48 +0000)
commitffb44cd08c625dc4eda7eea058e1049d1f630491
tree008aacbd735dd9272b994284c0ade6597f2fad35
parentc1e708ab070a08a4427e230dd9127138d527ceef
[3.13] gh-126425: Refactor `_lsprof_Profiler_enable` (GH-126426) (#126442)

gh-126425: Refactor `_lsprof_Profiler_enable` (GH-126426)

- Explicit memory management for `None` objects (since we still try to treat immortal objects as regular objects)
- Respect possible errors of `sys.monitoring.register_callback` call
(cherry picked from commit 75872605aa78dbdfc5c4f025b0f90a7f37ba10c3)

Co-authored-by: sobolevn <mail@sobolevn.me>
Modules/_lsprof.c