编解码器注册和支持函数

int PyCodec_Register ( PyObject * search_function )
属于 稳定 ABI (应用程序二进制接口) .

Register a new codec search function.

As side effect, this tries to load the encodings package, if not yet done, to make sure that it is always first in the list of search functions.

int PyCodec_Unregister ( PyObject * search_function )
属于 稳定 ABI (应用程序二进制接口) since version 3.10.

Unregister a codec search function and clear the registry’s cache. If the search function is not registered, do nothing. Return 0 on success. Raise an exception and return -1 on error.

3.10 版添加。