]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-119182: Use public PyUnicodeWriter in ast_unparse.c (#129208)
authorVictor Stinner <vstinner@python.org>
Thu, 23 Jan 2025 00:44:43 +0000 (01:44 +0100)
committerGitHub <noreply@github.com>
Thu, 23 Jan 2025 00:44:43 +0000 (01:44 +0100)
commit8eb9e76b5b2471031d6ad48ee3bc4554bb0067b7
treed98c0799455b081b34739e12d2e7db94e012abfe
parent327a257e6ae4ad0e3b6e00b35d24937e4b0a0395
gh-119182: Use public PyUnicodeWriter in ast_unparse.c (#129208)

Replace the private _PyUnicodeWriter API with the public
PyUnicodeWriter API.

* Add append_char() function.
* Add APPEND_CHAR() and APPEND_CHAR_FINISH() macros.
* Replace APPEND_STR() and APPEND_STR_FINISH() of single character
  with APPEND_CHAR() and APPEND_CHAR_FINISH().
Python/ast_unparse.c