summaryrefslogtreecommitdiffstats
path: root/Modules/readline.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/readline.c')
-rw-r--r--Modules/readline.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/readline.c b/Modules/readline.c
index 27459d0..a323b69 100644
--- a/Modules/readline.c
+++ b/Modules/readline.c
@@ -324,7 +324,7 @@ set_hook(const char *funcname, PyObject **hook_var, PyObject *args)
}
else if (PyCallable_Check(function)) {
Py_INCREF(function);
- Py_SETREF(*hook_var, function);
+ Py_XSETREF(*hook_var, function);
}
else {
PyErr_Format(PyExc_TypeError,