You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replace PyUnicode_New(), PyUnicode_CopyCharacters(), etc. with PyUnicodeWriter. It avoids creating incomplete Unicode strings: see Avoid creating incomplete/invalid objects.
Activity
pythongh-125196: Use PyUnicodeWriter in symtable.c
pythongh-125196: Use PyUnicodeWriter in symtable.c
pythongh-125196: Add PyUnicodeWriter_Fill() function
gh-125196: Use PyUnicodeWriter in symtable.c (#125199)
pythongh-125196: Add PyUnicodeWriter_Fill() function
pythongh-125196: Add PyUnicodeWriter_Fill() function
pythongh-125196: Add PyUnicodeWriter_Fill() function
vstinner commentedon Oct 9, 2024
I also replaced
PyUnicode_New(0, 0)withPy_GetConstant(Py_CONSTANT_EMPTY_STR)in commit b9a8ca0.pythongh-125196: Use PyUnicodeWriter for repr(list)
pythongh-125196: Add fast-path for int in PyUnicodeWriter_WriteStr()
pythongh-125196: Use PyUnicodeWriter for repr(structseq)
pythongh-125196: Use PyUnicodeWriter for repr(contextvars.Token)
gh-125196: Use PyUnicodeWriter for repr(list) (#125202)
pythongh-125196: PyUnicodeWriter_Discard(NULL) does nothing
gh-125196: Add fast-path for int in PyUnicodeWriter_WriteStr() (#125214)
12 remaining items
pythongh-125196: Use PyUnicodeWriter for repr(dict)
pythongh-125196: Use PyUnicodeWriter for repr(dict)
pythongh-125196: Use PyUnicodeWriter in parser
[-]Use PyUnicodeWriter API[/-][+]Use the public PyUnicodeWriter API[/+]gh-125196: Use PyUnicodeWriter for repr(dict) (#125270)
gh-125196: Use PyUnicodeWriter in parser (#125271)
pythongh-125196: Use PyUnicodeWriter in HAMT
pythongh-125196: Use PyUnicodeWriter in HAMT
pythongh-125196: Use PyUnicodeWriter in HAMT
gh-125196: Use PyUnicodeWriter in HAMT (#125458)
pythongh-125196: Use PyUnicodeWriter in _io.StringIO