Dave Malcolm <dmalc...@redhat.com> added the comment:

The attached patch:
  - extends the ast error-handling selftest with code that triggers this crash 
(on unpatched code)
  - fixes Parser/asdl_c.py to generate code using _PyUnicode_AS_STRING instead
  - contains the generated changes to Python/Python-ast.c

FWIW, it's not clear to what extent _PyUnicode_AS_STRING is deprecated, 
Include/unicodeobject.h currently has:
   *** This API is for interpreter INTERNAL USE ONLY and will likely
   *** be removed or changed for Python 3.1.
but I hope it won't be, it's far too useful.

----------
keywords: +patch
stage:  -> patch review
Added file: 
http://bugs.python.org/file19572/py3k-issue-10391-fix-ast-error-handling.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10391>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to