Message365427
_PyUnicode_AsKind is exposed as private C API. It is only used in unicodeobject.c, where it is defined. Its name starts with an underscore, it is not documented and not included in PC/python3.def (therefore is not exported on Windows). Seems it is not used in third party code (I have not found any occurrences on GitHub except CPython clones).
Initially it was also used in Python/formatter_unicode.c, and I think it is the only reason of exposing it in the header. I think that now it can be removed.
The proposed PR removes _PyUnicode_AsKind from headers, makes it static, rename it, and change its signature (since all the kind, data pointer and length are available at the caller site). It also includes minor cleanup and microoptimizations. |
|
Date |
User |
Action |
Args |
2020-03-31 21:15:43 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, vstinner |
2020-03-31 21:15:43 | serhiy.storchaka | set | messageid: <1585689343.48.0.60884405546.issue40130@roundup.psfhosted.org> |
2020-03-31 21:15:43 | serhiy.storchaka | link | issue40130 messages |
2020-03-31 21:15:43 | serhiy.storchaka | create | |
|