]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-134411: assert `PyLong_FromLong(x) != NULL` when `x` is known to be small (#134415)
authorSergey Muraviov <smurav@mail.ru>
Mon, 21 Jul 2025 08:59:06 +0000 (11:59 +0300)
committerGitHub <noreply@github.com>
Mon, 21 Jul 2025 08:59:06 +0000 (11:59 +0300)
commitcf19b6435d02dd7be11b84a44f4a8a9f1a935b15
tree70a42e53926bc4e2f63d8941eccda6fbd2ec631f
parent1e672935b44e084439527507a865b94a4c1315c3
gh-134411: assert `PyLong_FromLong(x) != NULL` when `x` is known to be small (#134415)

Since `PyLong_From Long(PY_MONITORING_DEBUGGER_ID)` falls to `small_int` case and can't return `NULL`. Added `assert`s for extra confidence.
https://github.com/python/cpython/issues/134411#issuecomment-2897653868
Python/instrumentation.c