| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
PyUnicode_AsUnicodeAndSize() -> PyUnicode_AsWideChar()
| // PyUnicode_AsWideChar() returns number of wchars including trailing NUL, | ||
| // when it is called with NULL. | ||
| if ((size_t)len-1 > self->b_size/sizeof(wchar_t)) { | ||
| PyErr_SetString(PyExc_ValueError, "string too long"); |
There was a problem hiding this comment.
Is it worth providing in the exception message the provided length and what the max length actually is?
Sorry, something went wrong.
There was a problem hiding this comment.
Maybe yes. But this file has similar codes which are not relating to wchar_t APIs. ("bytes string too long").
I want to keep this pull request simple.
Sorry, something went wrong.
Co-Authored-By: methane <songofacandy@gmail.com>
| Back | FazBrowse Home | New Git URL |
PyUnicode_AsUnicodeAndSize() -> PyUnicode_AsWideChar()