Merge 3.2

This commit is contained in:
Éric Araujo 2011-09-02 17:32:30 +02:00
commit 6f08f53e79
2 changed files with 2 additions and 2 deletions

View File

@ -807,7 +807,7 @@ static int obj2ast_identifier(PyObject* obj, PyObject** out, PyArena* arena)
static int obj2ast_string(PyObject* obj, PyObject** out, PyArena* arena)
{
if (!PyUnicode_CheckExact(obj)) {
if (!PyUnicode_CheckExact(obj) && !PyBytes_CheckExact(obj)) {
PyErr_SetString(PyExc_TypeError, "AST string must be of type str");
return 1;
}

View File

@ -604,7 +604,7 @@ static int obj2ast_identifier(PyObject* obj, PyObject** out, PyArena* arena)
static int obj2ast_string(PyObject* obj, PyObject** out, PyArena* arena)
{
if (!PyUnicode_CheckExact(obj)) {
if (!PyUnicode_CheckExact(obj) && !PyBytes_CheckExact(obj)) {
PyErr_SetString(PyExc_TypeError, "AST string must be of type str");
return 1;
}