]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Enhance and rewrite traceback dump C functions
authorVictor Stinner <victor.stinner@gmail.com>
Tue, 15 Mar 2016 20:49:37 +0000 (21:49 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Tue, 15 Mar 2016 20:49:37 +0000 (21:49 +0100)
commit89e7cdcb9c124a01c5c3a69e086a0e8b26e65545
treeb7cccbac029142a65590883492ad4edae96b7d70
parentb380010782959bd2d483320ea237ed3b8dd3d4f7
Enhance and rewrite traceback dump C functions

Issue #26564:

* Expose _Py_DumpASCII() and _Py_DumpDecimal() in traceback.h
* Change the type of the second _Py_DumpASCII() parameter from int to unsigned
  long
* Rewrite _Py_DumpDecimal() and dump_hexadecimal() to write directly characters
  in the expected order, avoid the need of reversing the string.
* dump_hexadecimal() limits width to the size of the buffer
* _Py_DumpASCII() does nothing if the object is not a Unicode string
* dump_frame() wrtites "???" as the line number if the line number is negative
Include/traceback.h
Python/traceback.c