summaryrefslogtreecommitdiffstats
path: root/Modules/_codecsmodule.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2010-06-08 22:54:19 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2010-06-08 22:54:19 (GMT)
commit3dcb5acdb0151d1686762329ec07ae2ac4d1caae (patch)
tree1b9d0230afafafa0cff920c7f55c9ca98e433719 /Modules/_codecsmodule.c
parent1fbd36b51d1bf65bc110e51840bede646b58f2d5 (diff)
downloadcpython-3dcb5acdb0151d1686762329ec07ae2ac4d1caae.zip
cpython-3dcb5acdb0151d1686762329ec07ae2ac4d1caae.tar.gz
cpython-3dcb5acdb0151d1686762329ec07ae2ac4d1caae.tar.bz2
Issue #8838, #8339: Remove codecs.charbuffer_encode() and "t#" parsing format
Remove last references to the "char buffer" of the buffer protocol from Python3.
Diffstat (limited to 'Modules/_codecsmodule.c')
-rw-r--r--Modules/_codecsmodule.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/Modules/_codecsmodule.c b/Modules/_codecsmodule.c
index d0d870c..cabe600 100644
--- a/Modules/_codecsmodule.c
+++ b/Modules/_codecsmodule.c
@@ -639,21 +639,6 @@ readbuffer_encode(PyObject *self,
}
static PyObject *
-charbuffer_encode(PyObject *self,
- PyObject *args)
-{
- const char *data;
- Py_ssize_t size;
- const char *errors = NULL;
-
- if (!PyArg_ParseTuple(args, "t#|z:charbuffer_encode",
- &data, &size, &errors))
- return NULL;
-
- return codec_tuple(PyBytes_FromStringAndSize(data, size), size);
-}
-
-static PyObject *
unicode_internal_encode(PyObject *self,
PyObject *args)
{
@@ -1116,7 +1101,6 @@ static PyMethodDef _codecs_functions[] = {
{"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)
{"mbcs_encode", mbcs_encode, METH_VARARGS},
{"mbcs_decode", mbcs_decode, METH_VARARGS},