Skip to content

Commit

Permalink
fix setting of type
Browse files Browse the repository at this point in the history
  • Loading branch information
kumaraditya303 committed Jun 26, 2024
1 parent cf09614 commit 8b77f8d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Include/internal/pycore_object.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ static inline void _Py_RefcntAdd(PyObject* op, Py_ssize_t n)
}
#define _Py_RefcntAdd(op, n) _Py_RefcntAdd(_PyObject_CAST(op), n)

extern void _Py_SetImmortal(PyObject *op);
extern void _Py_SetImmortalUntracked(PyObject *op);
PyAPI_FUNC(void) _Py_SetImmortal(PyObject *op);
PyAPI_FUNC(void) _Py_SetImmortalUntracked(PyObject *op);

// Makes an immortal object mortal again with the specified refcnt. Should only
// be used during runtime finalization.
Expand Down
4 changes: 2 additions & 2 deletions Modules/_asynciomodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -3947,8 +3947,8 @@ static int
module_exec(PyObject *mod)
{
asyncio_state *state = get_asyncio_state(mod);

_Py_SetImmortal((PyObject *)&state->asyncio_tasks.tail);
Py_SET_TYPE(&state->asyncio_tasks.tail, state->TaskType);
_Py_SetImmortalUntracked((PyObject *)&state->asyncio_tasks.tail);
state->asyncio_tasks.head = &state->asyncio_tasks.tail;

#define CREATE_TYPE(m, tp, spec, base) \
Expand Down

0 comments on commit 8b77f8d

Please sign in to comment.