This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients serhiy.storchaka, vstinner
Date 2020-03-31.21:15:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1585689343.48.0.60884405546.issue40130@roundup.psfhosted.org>
In-reply-to
Content
_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.
History
Date User Action Args
2020-03-31 21:15:43serhiy.storchakasetrecipients: + serhiy.storchaka, vstinner
2020-03-31 21:15:43serhiy.storchakasetmessageid: <1585689343.48.0.60884405546.issue40130@roundup.psfhosted.org>
2020-03-31 21:15:43serhiy.storchakalinkissue40130 messages
2020-03-31 21:15:43serhiy.storchakacreate