]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] gh-126425: Refactor `_lsprof_Profiler_enable` (GH-126426) (#126443)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 5 Nov 2024 12:42:33 +0000 (13:42 +0100)
committerGitHub <noreply@github.com>
Tue, 5 Nov 2024 12:42:33 +0000 (12:42 +0000)
commit786886a926fa025538f70a5a84259ab121e40782
tree489726cfa6aa3a4d672ad148428fc332176462e4
parent47d48b62ddfc96d69bd618401132460cbcde6681
[3.12] gh-126425: Refactor `_lsprof_Profiler_enable` (GH-126426) (#126443)

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