Lines Matching defs:text
324 text mode, the bytes 3 and 4 of the magic (\r\n) might not
337 don't work predictably x-platform for text-mode files).
500 PyObject **text)
587 v = PyObject_GetAttr(err, &_Py_ID(text));
592 *text = NULL;
595 *text = v;
612 /* Convert text to a char pointer; return if error */
613 const char *text = PyUnicode_AsUTF8(text_obj);
614 if (text == NULL) {
621 /* Strip leading whitespace from text, adjusting offset as we go */
622 while (*text == ' ' || *text == '\t' || *text == '\f') {
623 text++;
627 /* Calculate text length excluding trailing newline */
628 Py_ssize_t len = strlen(text);
629 if (len > 0 && text[len-1] == '\n') {
638 /* Skip past newlines embedded in text */
640 const char *nl = strchr(text, '\n');
644 Py_ssize_t inl = nl - text;
649 text += inl;
654 /* Print text */
658 if (PyFile_WriteString(text, f) < 0) {
663 if (text[len] != '\n') {
669 /* Don't print caret if it points to the left of the text */
965 PyObject *message, *filename, *text;
969 &end_lineno, &end_offset, &text)) {
990 if (text != NULL) {
992 const char *error_line = PyUnicode_AsUTF8AndSize(text, &line_size);
1001 // the size of the text in the source line.
1005 if (print_error_text(f, offset, end_offset, text) < 0) {
1008 Py_DECREF(text);
1015 Py_XDECREF(text);