python 2.7 -> python 3.14

This commit is contained in:
d1str4ught
2026-02-09 01:07:43 +01:00
parent 0ca2a293c8
commit 85609303d8
664 changed files with 666292 additions and 9725 deletions

View File

@@ -27,25 +27,22 @@ PyAPI_FUNC(int) PyCodec_Register(
PyObject *search_function
);
/* Codec register lookup API.
/* 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. */
Looks up the given encoding and returns a CodecInfo object with
function attributes which implement the different aspects of
processing the encoding.
PyAPI_FUNC(int) PyCodec_Unregister(
PyObject *search_function
);
The encoding string is looked up converted to all lower-case
characters. This makes encodings looked up through this mechanism
effectively case-insensitive.
/* Codec registry encoding check API.
If no codec is found, a KeyError is set and NULL returned.
Returns 1/0 depending on whether there is a registered codec for
the given encoding.
As side effect, this tries to load the encodings package, if not
yet done. This is part of the lazy load strategy for the encodings
package.
*/
*/
PyAPI_FUNC(PyObject *) _PyCodec_Lookup(
PyAPI_FUNC(int) PyCodec_KnownEncoding(
const char *encoding
);
@@ -54,7 +51,7 @@ PyAPI_FUNC(PyObject *) _PyCodec_Lookup(
object is passed through the encoder function found for the given
encoding using the error handling method defined by errors. errors
may be NULL to use the default method defined for the codec.
Raises a LookupError in case no encoder can be found.
*/
@@ -70,7 +67,7 @@ PyAPI_FUNC(PyObject *) PyCodec_Encode(
object is passed through the decoder function found for the given
encoding using the error handling method defined by errors. errors
may be NULL to use the default method defined for the codec.
Raises a LookupError in case no encoder can be found.
*/
@@ -81,55 +78,58 @@ PyAPI_FUNC(PyObject *) PyCodec_Decode(
const char *errors
);
/* --- Codec Lookup APIs --------------------------------------------------
// --- Codec Lookup APIs --------------------------------------------------
All APIs return a codec object with incremented refcount and are
based on _PyCodec_Lookup(). The same comments w/r to the encoding
name also apply to these APIs.
/* Codec registry lookup API.
*/
Looks up the given encoding and returns a CodecInfo object with
function attributes which implement the different aspects of
processing the encoding.
The encoding string is looked up converted to all lower-case
characters. This makes encodings looked up through this mechanism
effectively case-insensitive.
If no codec is found, a KeyError is set and NULL returned.
As side effect, this tries to load the encodings package, if not
yet done. This is part of the lazy load strategy for the encodings
package.
*/
/* Get an encoder function for the given encoding. */
PyAPI_FUNC(PyObject *) PyCodec_Encoder(
const char *encoding
);
PyAPI_FUNC(PyObject *) PyCodec_Encoder(const char *encoding);
/* Get a decoder function for the given encoding. */
PyAPI_FUNC(PyObject *) PyCodec_Decoder(
const char *encoding
);
PyAPI_FUNC(PyObject *) PyCodec_Decoder(const char *encoding);
/* Get a IncrementalEncoder object for the given encoding. */
/* Get an IncrementalEncoder object for the given encoding. */
PyAPI_FUNC(PyObject *) PyCodec_IncrementalEncoder(
const char *encoding,
const char *errors
);
const char *encoding,
const char *errors);
/* Get a IncrementalDecoder object function for the given encoding. */
/* Get an IncrementalDecoder object function for the given encoding. */
PyAPI_FUNC(PyObject *) PyCodec_IncrementalDecoder(
const char *encoding,
const char *errors
);
const char *encoding,
const char *errors);
/* Get a StreamReader factory function for the given encoding. */
PyAPI_FUNC(PyObject *) PyCodec_StreamReader(
const char *encoding,
PyObject *stream,
const char *errors
);
const char *encoding,
PyObject *stream,
const char *errors);
/* Get a StreamWriter factory function for the given encoding. */
PyAPI_FUNC(PyObject *) PyCodec_StreamWriter(
const char *encoding,
PyObject *stream,
const char *errors
);
const char *encoding,
PyObject *stream,
const char *errors);
/* Unicode encoding error handling callback registry API */
@@ -161,6 +161,15 @@ PyAPI_FUNC(PyObject *) PyCodec_XMLCharRefReplaceErrors(PyObject *exc);
/* replace the unicode encode error with backslash escapes (\x, \u and \U) */
PyAPI_FUNC(PyObject *) PyCodec_BackslashReplaceErrors(PyObject *exc);
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03050000
/* replace the unicode encode error with backslash escapes (\N, \x, \u and \U) */
PyAPI_FUNC(PyObject *) PyCodec_NameReplaceErrors(PyObject *exc);
#endif
#ifndef Py_LIMITED_API
PyAPI_DATA(const char *) Py_hexdigits;
#endif
#ifdef __cplusplus
}
#endif