summaryrefslogtreecommitdiffstats
path: root/Include/codecs.h
diff options
context:
space:
mode:
Diffstat (limited to 'Include/codecs.h')
-rw-r--r--Include/codecs.h38
1 files changed, 5 insertions, 33 deletions
diff --git a/Include/codecs.h b/Include/codecs.h
index 3ad0f2b..851bc9f 100644
--- a/Include/codecs.h
+++ b/Include/codecs.h
@@ -27,7 +27,7 @@ PyAPI_FUNC(int) PyCodec_Register(
PyObject *search_function
);
-/* Codec registry lookup API.
+/* Codec register lookup API.
Looks up the given encoding and returns a CodecInfo object with
function attributes which implement the different aspects of
@@ -45,33 +45,16 @@ PyAPI_FUNC(int) PyCodec_Register(
*/
-#ifndef Py_LIMITED_API
PyAPI_FUNC(PyObject *) _PyCodec_Lookup(
const char *encoding
);
-PyAPI_FUNC(int) _PyCodec_Forget(
- const char *encoding
- );
-#endif
-
-/* Codec registry encoding check API.
-
- Returns 1/0 depending on whether there is a registered codec for
- the given encoding.
-
-*/
-
-PyAPI_FUNC(int) PyCodec_KnownEncoding(
- const char *encoding
- );
-
/* Generic codec based encoding API.
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.
*/
@@ -87,7 +70,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.
*/
@@ -98,11 +81,10 @@ PyAPI_FUNC(PyObject *) PyCodec_Decode(
const char *errors
);
-#ifndef Py_LIMITED_API
/* Text codec specific encoding and decoding API.
Checks the encoding against a list of codecs which do not
- implement a str<->bytes encoding before attempting the
+ implement a unicode<->bytes encoding before attempting the
operation.
Please note that these APIs are internal and should not
@@ -141,11 +123,10 @@ PyAPI_FUNC(PyObject *) _PyCodecInfo_GetIncrementalEncoder(
PyObject *codec_info,
const char *errors
);
-#endif
-/* --- 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
@@ -225,15 +206,6 @@ 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