From: William S Fulton Date: Fri, 4 Jul 2025 15:54:00 +0000 (+0100) Subject: gh-136288: Fix error message in `_testcapi/vectorcall.c` (GH-136258) X-Git-Tag: v3.15.0a1~1089 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d1d5dce14f90d777608e4403d09079421ff55944;p=thirdparty%2FPython%2Fcpython.git gh-136288: Fix error message in `_testcapi/vectorcall.c` (GH-136258) Use the %N format specifier instead of %s and `PyType_GetName`. --- diff --git a/Modules/_testcapi/vectorcall.c b/Modules/_testcapi/vectorcall.c index 03aaacb328e0..f89dcb6c4cf0 100644 --- a/Modules/_testcapi/vectorcall.c +++ b/Modules/_testcapi/vectorcall.c @@ -179,14 +179,14 @@ _testcapi_VectorCallClass_set_vectorcall_impl(PyObject *self, if (!PyObject_TypeCheck(self, type)) { return PyErr_Format( PyExc_TypeError, - "expected %s instance", - PyType_GetName(type)); + "expected %N instance", + type); } if (!type->tp_vectorcall_offset) { return PyErr_Format( PyExc_TypeError, - "type %s has no vectorcall offset", - PyType_GetName(type)); + "type %N has no vectorcall offset", + type); } *(vectorcallfunc*)((char*)self + type->tp_vectorcall_offset) = ( VectorCallClass_vectorcall);