Lines Matching defs:wstr

131     (_PyASCIIObject_CAST(op)->wstr)
178 /* true if the Unicode object has an allocated wstr memory block
540 CHECK(ascii->wstr != NULL);
568 CHECK(ascii->wstr == data);
571 CHECK(ascii->wstr != data);
576 if (ascii->wstr == NULL)
1093 wchar_t *wstr;
1156 wstr = _PyUnicode_WSTR(unicode);
1157 wstr = PyObject_Realloc(wstr, new_size);
1158 if (!wstr) {
1162 _PyUnicode_WSTR(unicode) = wstr;
1276 return "wstr";
1349 if (ascii->wstr == data)
1351 printf("wstr=%p", (void *)ascii->wstr);
1482 This function assumes that unicode can hold one more code point than wstr
3194 const wchar_t *wstr = _PyUnicode_WSTR(unicode);
3195 if (wstr != NULL) {
3196 memcpy(w, wstr, size * sizeof(wchar_t));
3733 wchar_t *wstr = PyUnicode_AsWideCharString(unicode, &wlen);
3734 if (wstr == NULL) {
3738 if ((size_t)wlen != wcslen(wstr)) {
3740 PyMem_Free(wstr);
3747 int res = _Py_EncodeLocaleEx(wstr, &str, &error_pos, &reason,
3749 PyMem_Free(wstr);
3967 wchar_t *wstr;
3970 int res = _Py_DecodeLocaleEx(str, &wstr, &wlen, &reason,
3994 PyObject *unicode = PyUnicode_FromWideChar(wstr, wlen);
3995 PyMem_RawFree(wstr);
4247 const Py_UNICODE *wstr;
4249 wstr = PyUnicode_AsUnicodeAndSize(unicode, &size);
4250 if (wstr && wcslen(wstr) != (size_t)size) {
4254 return wstr;
5255 *wstr (use PyMem_RawFree() to free the memory) and write the output length
5264 _Py_DecodeUTF8Ex(const char *s, Py_ssize_t size, wchar_t **wstr, size_t *wlen,
5367 *wstr = unicode;
5376 wchar_t *wstr;
5378 &wstr, wlen,
5388 return wstr;
12341 const wchar_t *wstr = _PyUnicode_WSTR(self);
12342 Py_UCS4 ch = wstr[i++];
12346 && Py_UNICODE_IS_LOW_SURROGATE(wstr[i]))
12348 ch = Py_UNICODE_JOIN_SURROGATES(ch, wstr[i]);
12357 ch = wstr[i++];
12361 && Py_UNICODE_IS_LOW_SURROGATE(wstr[i]))
12363 ch = Py_UNICODE_JOIN_SURROGATES(ch, wstr[i]);
14141 /* If the wstr pointer is present, account for it unless it is shared
15879 encode_wstr_utf8(wchar_t *wstr, char **str, const char *name)
15882 res = _Py_EncodeUTF8Ex(wstr, str, NULL, NULL, 1, _Py_ERROR_STRICT);
16111 if (ascii->wstr) {
16112 PyObject_Free(ascii->wstr);
16113 ascii->wstr = NULL;
16119 if (ascii->wstr && ascii->wstr != data) {
16120 PyObject_Free(ascii->wstr);
16121 ascii->wstr = NULL;