PyDescr_NewMethod() and PyCFunction_NewEx() now include the method
name in the SystemError "bad call flags" error message to ease debug.
(cherry picked from commit
c7d2d69d95b263ee5f83511bc6fbe53acdc24ea3)
--- /dev/null
+:c:func:`PyDescr_NewMethod` and :c:func:`PyCFunction_NewEx` now include the
+method name in the SystemError "bad call flags" error message to ease debug.
vectorcall = method_vectorcall_O;
break;
default:
- PyErr_SetString(PyExc_SystemError, "bad call flags");
+ PyErr_Format(PyExc_SystemError,
+ "%s() method: bad call flags", method->ml_name);
return NULL;
}
vectorcall = cfunction_vectorcall_O;
break;
default:
- PyErr_SetString(PyExc_SystemError, "bad call flags");
+ PyErr_Format(PyExc_SystemError,
+ "%s() method: bad call flags", ml->ml_name);
return NULL;
}