[Python-checkins] cpython (merge 3.2 -> default): Merge 3.2
eric.araujo
python-checkins at python.org
Fri Sep 2 17:45:29 CEST 2011
http://hg.python.org/cpython/rev/321b8372eef6
changeset: 72195:321b8372eef6
parent: 72193:017548088eee
parent: 72194:83c16d258fec
user: Éric Araujo <merwok at netwok.org>
date: Fri Sep 02 17:32:30 2011 +0200
summary:
Merge 3.2
files:
Parser/asdl_c.py | 2 +-
Python/Python-ast.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Parser/asdl_c.py b/Parser/asdl_c.py
--- a/Parser/asdl_c.py
+++ b/Parser/asdl_c.py
@@ -807,7 +807,7 @@
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;
}
diff --git a/Python/Python-ast.c b/Python/Python-ast.c
--- a/Python/Python-ast.c
+++ b/Python/Python-ast.c
@@ -604,7 +604,7 @@
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;
}
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list