Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
gh121528: Fix the process crash when load extension when it's compile…
…d with low version of the python
  • Loading branch information
Zheaoli committed Jul 9, 2024
commit 871d9e6e555e74c5bd993c33e31768392cda1afe
5 changes: 3 additions & 2 deletions Include/internal/pycore_object.h
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,9 @@ _PyObject_Init(PyObject *op, PyTypeObject *typeobj)
{
assert(op != NULL);
Py_SET_TYPE(op, typeobj);
assert(_PyType_HasFeature(typeobj, Py_TPFLAGS_HEAPTYPE) || _Py_IsImmortal(typeobj));
Py_INCREF(typeobj);
if (_PyType_HasFeature(typeobj, Py_TPFLAGS_HEAPTYPE) || _Py_IsImmortal(typeobj)){
Comment thread
Zheaoli marked this conversation as resolved.
Outdated
Py_INCREF(typeobj);
}
_Py_NewReference(op);
}

Expand Down