comparison Python/pythonrun.c @ 73640:c4c1c8af0115

print_exception() uses PyUnicode_GetLength() instead of PyUnicode_GetSize()
author Victor Stinner <victor.stinner@haypocalc.com>
date Sun, 20 Nov 2011 19:20:00 +0100
parents fa2f8dd077e0
children 37300a1df7d7
comparison
equal deleted inserted replaced
73639:459336931f19 73640:c4c1c8af0115
1639 object is not the empty string 1639 object is not the empty string
1640 */ 1640 */
1641 if (s == NULL) 1641 if (s == NULL)
1642 err = -1; 1642 err = -1;
1643 else if (!PyUnicode_Check(s) || 1643 else if (!PyUnicode_Check(s) ||
1644 PyUnicode_GetSize(s) != 0) 1644 PyUnicode_GetLength(s) != 0)
1645 err = PyFile_WriteString(": ", f); 1645 err = PyFile_WriteString(": ", f);
1646 if (err == 0) 1646 if (err == 0)
1647 err = PyFile_WriteObject(s, f, Py_PRINT_RAW); 1647 err = PyFile_WriteObject(s, f, Py_PRINT_RAW);
1648 Py_XDECREF(s); 1648 Py_XDECREF(s);
1649 } 1649 }