summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_weakref.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_weakref.c b/Modules/_weakref.c
index 7987337..f797fbf 100644
--- a/Modules/_weakref.c
+++ b/Modules/_weakref.c
@@ -69,7 +69,7 @@ weakref_ref(PyObject *self, PyObject *args)
PyObject *callback = NULL;
PyObject *result = NULL;
- if (PyArg_ParseTuple(args, "O|O:ref", &object, &callback)) {
+ if (PyArg_UnpackTuple(args, "ref", 1, 2, &object, &callback)) {
result = PyWeakref_NewRef(object, callback);
}
return result;
@@ -88,7 +88,7 @@ weakref_proxy(PyObject *self, PyObject *args)
PyObject *callback = NULL;
PyObject *result = NULL;
- if (PyArg_ParseTuple(args, "O|O:new", &object, &callback)) {
+ if (PyArg_UnpackTuple(args, "proxy", 1, 2, &object, &callback)) {
result = PyWeakref_NewProxy(object, callback);
}
return result;