Merge 3.2
This commit is contained in:
commit
6f08f53e79
|
@ -807,7 +807,7 @@ static int obj2ast_identifier(PyObject* obj, PyObject** out, PyArena* arena)
|
||||||
|
|
||||||
static int obj2ast_string(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");
|
PyErr_SetString(PyExc_TypeError, "AST string must be of type str");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -604,7 +604,7 @@ static int obj2ast_identifier(PyObject* obj, PyObject** out, PyArena* arena)
|
||||||
|
|
||||||
static int obj2ast_string(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");
|
PyErr_SetString(PyExc_TypeError, "AST string must be of type str");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue