Remove private _PyCodec_Lookup() function (#106269)

Remove the following private functions of the C API:

* _PyCodecInfo_GetIncrementalDecoder()
* _PyCodecInfo_GetIncrementalEncoder()
* _PyCodec_DecodeText()
* _PyCodec_EncodeText()
* _PyCodec_Forget()
* _PyCodec_Lookup()
* _PyCodec_LookupTextEncoding()

Move these functions to a new pycore_codecs.h internal header file.

These functions are no longer exported.
This commit is contained in:
Victor Stinner 2023-06-30 11:34:01 +02:00 committed by GitHub
parent e17420db5d
commit 0b51463862
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 88 additions and 98 deletions

View file

@ -4,6 +4,7 @@
#include "pycore_call.h" // _PyObject_CallMethod()
#include "pycore_ceval.h" // _PyEval_FiniGIL()
#include "pycore_codecs.h" // _PyCodec_Lookup()
#include "pycore_context.h" // _PyContext_Init()
#include "pycore_dict.h" // _PyDict_Fini()
#include "pycore_exceptions.h" // _PyExc_InitTypes()