mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
gh-105587: Remove assertion from _PyStaticObject_CheckRefcnt (#105638)
This commit is contained in:
parent
dab5a3ebe8
commit
6199fe3b32
2 changed files with 5 additions and 3 deletions
|
|
@ -12,9 +12,8 @@ extern "C" {
|
|||
static inline void
|
||||
_PyStaticObject_CheckRefcnt(PyObject *obj) {
|
||||
if (Py_REFCNT(obj) < _Py_IMMORTAL_REFCNT) {
|
||||
_PyObject_ASSERT_FAILED_MSG(obj,
|
||||
"immortal object has less refcnt than expected "
|
||||
"_Py_IMMORTAL_REFCNT");
|
||||
fprintf(stderr, "Immortal Object has less refcnt than expected.\n");
|
||||
_PyObject_Dump(obj);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
The runtime can't guarantee that immortal objects will not be mutated by
|
||||
Extensions. Thus, this modifies _PyStaticObject_CheckRefcnt to warn
|
||||
instead of asserting.
|
||||
Loading…
Add table
Add a link
Reference in a new issue