summaryrefslogtreecommitdiffstats
path: root/Include/internal/pycore_codecs.h
diff options
context:
space:
mode:
Diffstat (limited to 'Include/internal/pycore_codecs.h')
-rw-r--r--Include/internal/pycore_codecs.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/Include/internal/pycore_codecs.h b/Include/internal/pycore_codecs.h
index 5e2d5c5..4400be8 100644
--- a/Include/internal/pycore_codecs.h
+++ b/Include/internal/pycore_codecs.h
@@ -21,6 +21,17 @@ extern void _PyCodec_Fini(PyInterpreterState *interp);
extern PyObject* _PyCodec_Lookup(const char *encoding);
+/*
+ * Un-register the error handling callback function registered under
+ * the given 'name'. Only custom error handlers can be un-registered.
+ *
+ * - Return -1 and set an exception if 'name' refers to a built-in
+ * error handling name (e.g., 'strict'), or if an error occurred.
+ * - Return 0 if no custom error handler can be found for 'name'.
+ * - Return 1 if the custom error handler was successfully removed.
+ */
+extern int _PyCodec_UnregisterError(const char *name);
+
/* Text codec specific encoding and decoding API.
Checks the encoding against a list of codecs which do not