comparison Python/Python-ast.c @ 72195:321b8372eef6

Merge 3.2
author Éric Araujo <merwok@netwok.org>
date Fri, 02 Sep 2011 17:32:30 +0200
parents cfccc755c457
children 81380082d216
comparison
equal deleted inserted replaced
72193:017548088eee 72195:321b8372eef6
602 return obj2ast_object(obj, out, arena); 602 return obj2ast_object(obj, out, arena);
603 } 603 }
604 604
605 static int obj2ast_string(PyObject* obj, PyObject** out, PyArena* arena) 605 static int obj2ast_string(PyObject* obj, PyObject** out, PyArena* arena)
606 { 606 {
607 if (!PyUnicode_CheckExact(obj)) { 607 if (!PyUnicode_CheckExact(obj) && !PyBytes_CheckExact(obj)) {
608 PyErr_SetString(PyExc_TypeError, "AST string must be of type str"); 608 PyErr_SetString(PyExc_TypeError, "AST string must be of type str");
609 return 1; 609 return 1;
610 } 610 }
611 return obj2ast_object(obj, out, arena); 611 return obj2ast_object(obj, out, arena);
612 } 612 }