Use unicode and remove support for some uses of str8.

This commit is contained in:
Neal Norwitz 2007-08-26 04:51:10 +00:00
parent 6ea45d3341
commit ed2b7397a0
5 changed files with 15 additions and 31 deletions

View file

@ -833,10 +833,7 @@ SyntaxError_str(PySyntaxErrorObject *self)
/* XXX -- do all the additional formatting with filename and
lineno here */
if (self->filename) {
if (PyString_Check(self->filename))
filename = PyString_AsString(self->filename);
else if (PyUnicode_Check(self->filename))
if (self->filename && PyUnicode_Check(self->filename)) {
filename = PyUnicode_AsString(self->filename);
}
have_lineno = (self->lineno != NULL) && PyInt_CheckExact(self->lineno);