Home | History | Annotate | Download | only in Objects

Lines Matching defs:ascii

361     PyASCIIObject *ascii;
366 ascii = (PyASCIIObject *)op;
367 kind = ascii->state.kind;
369 if (ascii->state.ascii == 1 && ascii->state.compact == 1) {
371 assert(ascii->state.ready == 1);
377 if (ascii->state.compact == 1) {
382 assert(ascii->state.ascii == 0);
383 assert(ascii->state.ready == 1);
391 assert(ascii->length == 0);
392 assert(ascii->hash == -1);
393 assert(ascii->state.compact == 0);
394 assert(ascii->state.ascii == 0);
395 assert(ascii->state.ready == 0);
396 assert(ascii->state.interned == SSTATE_NOT_INTERNED);
397 assert(ascii->wstr != NULL);
405 assert(ascii->state.compact == 0);
406 assert(ascii->state.ready == 1);
408 if (ascii->state.ascii) {
410 assert (compact->utf8_length == ascii->length);
425 assert(ascii->wstr == data);
426 assert(compact->wstr_length == ascii->length);
428 assert(ascii->wstr != data);
433 if (ascii->wstr == NULL)
444 data = PyUnicode_DATA(ascii);
445 for (i=0; i < ascii->length; i++)
452 if (ascii->state.ascii == 0) {
467 assert(PyUnicode_READ(kind, data, ascii->length) == 0);
573 ASCII, Latin1, UTF-8, etc. */
640 ASCII, Latin1, UTF-8, etc. */
865 ASCII and UCS-4 strings. U+00FF is invalid in ASCII and U+FFFFFFFF is an
1099 _PyUnicode_STATE(unicode).ascii = 0;
1139 return "legacy ascii";
1154 return "ascii";
1178 printf("compact ascii %d\n", PyUnicode_IS_COMPACT_ASCII(unicode));
1179 printf("ascii op %p\n", ((void*)((PyASCIIObject*)(unicode) + 1)));
1188 PyASCIIObject *ascii = (PyASCIIObject *)op;
1193 if (ascii->state.compact)
1195 if (ascii->state.ascii)
1196 data = (ascii + 1);
1203 unicode_kind_name(op), ascii->length);
1205 if (ascii->wstr == data)
1207 printf("wstr=%p", ascii->wstr);
1209 if (!(ascii->state.ascii == 1 && ascii->state.compact == 1)) {
1211 if (!ascii->state.compact && compact->utf8 == unicode->data.any)
1299 _PyUnicode_STATE(unicode).ascii = is_ascii;
1430 /* Writing Latin-1 characters into an ASCII string requires to
1431 check that all written characters are pure ASCII */
1676 _PyUnicode_STATE(unicode).ascii = 1;
1681 _PyUnicode_STATE(unicode).ascii = 0;
1801 PyASCIIObject *ascii = (PyASCIIObject *)unicode;
1804 if (ascii->state.kind != PyUnicode_WCHAR_KIND && ascii->length == 1)
1896 /* Copy an ASCII or latin1 char* string into a Python Unicode string.
1900 ASCII string). */
2836 PyObject *ascii;
2838 ascii = PyObject_ASCII(obj);
2839 if (!ascii)
2841 if (unicode_fromformat_write_str(writer, ascii, width, precision) == -1) {
2842 Py_DECREF(ascii);
2845 Py_DECREF(ascii);
2899 "PyUnicode_FromFormatV() expects an ASCII-encoded format "
2900 "string, got a non-ASCII byte: 0x%02x",
3189 if (strcmp(lower, "ascii") == 0
3587 if (strcmp(lower, "ascii") == 0
4031 /* Non-ASCII compact unicode object */
4467 * decoded as itself. We are permissive on decoding; the only ASCII
4474 /* The UTF-7 encoder treats ASCII characters differently according to
4561 /* Start off assuming it's all ASCII. Widen later as necessary. */
4879 non-ASCII, UTF8-encoded char. */
4975 /* ASCII is equivalent to the first 128 ordinals in Unicode. */
5176 /* the string cannot be ASCII, or PyUnicode_UTF8() would be set */
6191 /* Copy printable US ASCII as-is */
6215 /* Map non-printable US ASCII and 8-bit characters to '\xHH' */
6710 const char *encoding = (limit == 256) ? "latin-1" : "ascii";
6923 /* --- 7-bit ASCII Codec -------------------------------------------------- */
6945 /* ASCII is equivalent to the first 128 ordinals in Unicode. */
7005 "ascii", "ordinal not in range(128)",
7048 /* Fast path: if it is an ASCII-only string, construct bytes object
7663 "unable to encode error handler result to ASCII");
8832 /* invalid character or character outside ASCII:
8864 /* Fast path for ascii => ascii translation. Return 1 if the whole string
9109 /* If the string is already ASCII, just return the same string */
11376 /* Don't resize for ascii += latin1. Convert ascii to latin1 requires
11671 /* Believe it or not, this produces the same value for ASCII strings
12108 and for the ASCII range, the 2.x rules apply (i.e
12594 /* Fast-path ASCII */
12667 /* Map non-printable US ASCII to '\xhh' */
12675 /* Copy ASCII characters as-is */
12680 /* Non-ASCII characters */
12683 ASCII space)
13427 /* ASCII is the bare minimum */
13620 const char *ascii, Py_ssize_t len)
13623 len = strlen(ascii);
13625 assert(ucs1lib_find_max_char((Py_UCS1*)ascii, (Py_UCS1*)ascii + len) < 128);
13630 str = _PyUnicode_FromASCII(ascii, len);
13648 const Py_UCS1 *str = (const Py_UCS1 *)ascii;
13658 ascii, ascii + len,
13666 ascii, ascii + len,
14995 _PyUnicode_STATE(self).ascii = _PyUnicode_STATE(unicode).ascii;