Skip to content

Commit

Permalink
Address code review
Browse files Browse the repository at this point in the history
  • Loading branch information
corona10 committed Oct 6, 2023
1 parent 544fe84 commit 86b97a5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Include/internal/pycore_signal.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ struct _signals_runtime_state {
/* func is atomic to ensure that PyErr_SetInterrupt is async-signal-safe
* (even though it would probably be otherwise, anyway).
*/
uintptr_t func;
void* func;
} handlers[Py_NSIG];

volatile struct {
Expand Down
4 changes: 2 additions & 2 deletions Modules/signalmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,13 @@ typedef struct {
Py_LOCAL_INLINE(PyObject *)
get_handler(int i)
{
return (PyObject *)_Py_atomic_load_uintptr(&Handlers[i].func);
return (PyObject *)_Py_atomic_load_ptr(&Handlers[i].func);
}

Py_LOCAL_INLINE(void)
set_handler(int i, PyObject* func)
{
_Py_atomic_store_uintptr(&Handlers[i].func, (uintptr_t)func);
_Py_atomic_store_ptr(&Handlers[i].func, func);
}


Expand Down

0 comments on commit 86b97a5

Please sign in to comment.