10000 Replace PyErr_Format() with PyErr_SetString() · python/cpython@cf1f74a · GitHub
[go: up one dir, main page]

Skip to content

Commit cf1f74a

Browse files
committed
Replace PyErr_Format() with PyErr_SetString()
1 parent 9b33dca commit cf1f74a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Objects/unicodeobject.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2446,7 +2446,8 @@ PyUnicode_Export(PyObject *unicode, uint32_t requested_formats, Py_buffer *view)
24462446
1, "B", PyUnicode_FORMAT_UTF8);
24472447
}
24482448

2449-
PyErr_Format(PyExc_ValueError, "unable to find a matching export format");
2449+
PyErr_SetString(PyExc_ValueError,
2450+
"unable to find a matching export format");
24502451
return -1;
24512452

24522453
#undef BUFFER_UCS4

0 commit comments

Comments
 (0)
0