mirror of
https://github.com/python/cpython.git
synced 2025-11-01 10:45:30 +00:00
Issue #10833: Use PyUnicode_FromFormat() and PyErr_Format() instead of
PyOS_snprintf().
This commit is contained in:
parent
bfc7bf06a6
commit
499dfcf29d
6 changed files with 54 additions and 68 deletions
|
|
@ -43,11 +43,9 @@ static PyObject*
|
|||
sizeof_error(const char* fatname, const char* typname,
|
||||
int expected, int got)
|
||||
{
|
||||
char buf[1024];
|
||||
PyOS_snprintf(buf, sizeof(buf),
|
||||
"%.200s #define == %d but sizeof(%.200s) == %d",
|
||||
PyErr_Format(TestError,
|
||||
"%s #define == %d but sizeof(%s) == %d",
|
||||
fatname, expected, typname, got);
|
||||
PyErr_SetString(TestError, buf);
|
||||
return (PyObject*)NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue