Skip to content

Commit e74aad5

Browse files
committed
Changed method to call PyObject_CallMethodNoArgs
1 parent 32e0130 commit e74aad5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

mypyc/lib-rt/list_ops.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,12 @@ PyObject *CPyList_Copy(PyObject *list) {
3434
return PyList_GetSlice(list, 0, PyList_GET_SIZE(list));
3535
}
3636
_Py_IDENTIFIER(copy);
37-
return _PyObject_CallMethodIdNoArgs(list, &PyId_copy);
37+
38+
PyObject *name = _PyUnicode_FromId(&PyId_copy);
39+
if (name == NULL) {
40+
return NULL;
41+
}
42+
return PyObject_CallMethodNoArgs(list, name);
3843
}
3944

4045

0 commit comments

Comments
 (0)