summaryrefslogtreecommitdiffstats
path: root/Modules/_codecsmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_codecsmodule.c')
-rw-r--r--Modules/_codecsmodule.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/Modules/_codecsmodule.c b/Modules/_codecsmodule.c
index 080fa74..32fa82f 100644
--- a/Modules/_codecsmodule.c
+++ b/Modules/_codecsmodule.c
@@ -792,6 +792,15 @@ charmap_encode(PyObject *self,
return v;
}
+static PyObject*
+charmap_build(PyObject *self, PyObject *args)
+{
+ PyObject *map;
+ if (!PyArg_ParseTuple(args, "U:charmap_build", &map))
+ return NULL;
+ return PyUnicode_BuildEncodingMap(map);
+}
+
#if defined(MS_WINDOWS) && defined(HAVE_USABLE_WCHAR_T)
static PyObject *
@@ -897,6 +906,7 @@ static PyMethodDef _codecs_functions[] = {
{"ascii_decode", ascii_decode, METH_VARARGS},
{"charmap_encode", charmap_encode, METH_VARARGS},
{"charmap_decode", charmap_decode, METH_VARARGS},
+ {"charmap_build", charmap_build, METH_VARARGS},
{"readbuffer_encode", readbuffer_encode, METH_VARARGS},
{"charbuffer_encode", charbuffer_encode, METH_VARARGS},
#if defined(MS_WINDOWS) && defined(HAVE_USABLE_WCHAR_T)