bpo-40130: _PyUnicode_AsKind() should not be exported. (GH-19265)

Make it a static function, and pass known attributes
(kind, data, length) instead of the PyUnicode object.
This commit is contained in:
Serhiy Storchaka 2020-04-01 15:41:49 +03:00 committed by GitHub
parent 3ef4a7e5a7
commit 17b4733f2f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 46 additions and 55 deletions

View file

@ -726,12 +726,6 @@ PyAPI_FUNC(int) _PyUnicode_FormatAdvancedWriter(
Py_ssize_t start,
Py_ssize_t end);
/* --- wchar_t support for platforms which support it --------------------- */
#ifdef HAVE_WCHAR_H
PyAPI_FUNC(void*) _PyUnicode_AsKind(PyObject *s, unsigned int kind);
#endif
/* --- Manage the default encoding ---------------------------------------- */
/* Returns a pointer to the default encoding (UTF-8) of the