Lines Matching defs:wlen
3732 Py_ssize_t wlen;
3733 wchar_t *wstr = PyUnicode_AsWideCharString(unicode, &wlen);
3738 if ((size_t)wlen != wcslen(wstr)) {
3968 size_t wlen;
3970 int res = _Py_DecodeLocaleEx(str, &wstr, &wlen, &reason,
3977 (Py_ssize_t)wlen,
3978 (Py_ssize_t)(wlen + 1),
3994 PyObject *unicode = PyUnicode_FromWideChar(wstr, wlen);
4211 Py_ssize_t wlen = unicode_get_widechar_size(unicode);
4212 if ((size_t)wlen > PY_SSIZE_T_MAX / sizeof(wchar_t) - 1) {
4216 w = (wchar_t *) PyObject_Malloc(sizeof(wchar_t) * (wlen + 1));
4221 unicode_copy_as_widechar(unicode, w, wlen + 1);
4224 _PyUnicode_WSTR_LENGTH(unicode) = wlen;
5256 (in number of wchar_t units) into *wlen (if wlen is set).
5260 On decoding error (if surrogateescape is zero), return -2. If wlen is
5261 non-NULL, write the start of the illegal byte sequence into *wlen. If reason
5264 _Py_DecodeUTF8Ex(const char *s, Py_ssize_t size, wchar_t **wstr, size_t *wlen,
5355 if (wlen != NULL) {
5356 *wlen = s - orig_s;
5364 if (wlen) {
5365 *wlen = outpos;
5374 size_t *wlen)
5378 &wstr, wlen,
5383 if (wlen) {
5384 *wlen = (size_t)res;