Skip to content

Commit bd7bc3e

Browse files
Fix tuple_make_single
1 parent d45bd2a commit bd7bc3e

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

Modules/_testcapi/tuple.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -131,13 +131,8 @@ tuple_fromarray(PyObject* Py_UNUSED(module), PyObject *args)
131131
}
132132

133133
static PyObject *
134-
tuple_make_single(PyObject *Py_UNUSED(module), PyObject *args)
134+
tuple_make_single(PyObject *Py_UNUSED(module), PyObject *one)
135135
{
136-
PyObject *one;
137-
if (!PyArg_ParseTuple(args, "O", &one)) {
138-
return NULL;
139-
}
140-
141136
return PyTuple_MakeSingle(one);
142137
}
143138

@@ -160,7 +155,7 @@ static PyMethodDef test_methods[] = {
160155
{"_tuple_resize", _tuple_resize, METH_VARARGS},
161156
{"_check_tuple_item_is_NULL", _check_tuple_item_is_NULL, METH_VARARGS},
162157
{"tuple_fromarray", tuple_fromarray, METH_VARARGS},
163-
{"tuple_make_single", tuple_make_single, METH_VARARGS},
158+
{"tuple_make_single", tuple_make_single, METH_O},
164159
{"tuple_make_pair", tuple_make_pair, METH_VARARGS},
165160
{NULL},
166161
};

0 commit comments

Comments
 (0)