Issue #9425: Create PyErr_WarnFormat() function

Similar to PyErr_WarnEx() but use PyUnicode_FromFormatV() to format the warning
message.

Strip also some trailing spaces.
This commit is contained in:
Victor Stinner 2010-08-13 14:03:48 +00:00
parent b4b8eb9163
commit 4a2b7a1b14
7 changed files with 74 additions and 34 deletions

View file

@ -7,6 +7,7 @@ extern "C" {
PyAPI_FUNC(PyObject*) _PyWarnings_Init(void);
PyAPI_FUNC(int) PyErr_WarnEx(PyObject *, const char *, Py_ssize_t);
PyAPI_FUNC(int) PyErr_WarnFormat(PyObject *, Py_ssize_t, const char *, ...);
PyAPI_FUNC(int) PyErr_WarnExplicit(PyObject *, const char *, const char *, int,
const char *, PyObject *);