summaryrefslogtreecommitdiffstats
path: root/Modules/_testcapimodule.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-01-05 00:19:28 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-01-05 00:19:28 (GMT)
commitca1e7ec3444c372335c96f83d1550b16b0783557 (patch)
tree5cab60903900be4f45de13d8faaf6dd17ee83147 /Modules/_testcapimodule.c
parent1ec121d0d19b0ab55cead5974d126fb9b0f95938 (diff)
downloadcpython-ca1e7ec3444c372335c96f83d1550b16b0783557.zip
cpython-ca1e7ec3444c372335c96f83d1550b16b0783557.tar.gz
cpython-ca1e7ec3444c372335c96f83d1550b16b0783557.tar.bz2
test_unicode: use ctypes to test PyUnicode_FromFormat()
Instead of _testcapi.format_unicode() because it has a limited API: it requires exactly one argument of type unicode.
Diffstat (limited to 'Modules/_testcapimodule.c')
-rw-r--r--Modules/_testcapimodule.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c
index 587a9f0..f326568 100644
--- a/Modules/_testcapimodule.c
+++ b/Modules/_testcapimodule.c
@@ -2246,17 +2246,6 @@ crash_no_current_thread(PyObject *self)
return NULL;
}
-static PyObject *
-format_unicode(PyObject *self, PyObject *args)
-{
- const char *format;
- PyObject *arg;
- if (!PyArg_ParseTuple(args, "yU", &format, &arg))
- return NULL;
- return PyUnicode_FromFormat(format, arg);
-
-}
-
static PyMethodDef TestMethods[] = {
{"raise_exception", raise_exception, METH_VARARGS},
{"raise_memoryerror", (PyCFunction)raise_memoryerror, METH_NOARGS},
@@ -2338,7 +2327,6 @@ static PyMethodDef TestMethods[] = {
{"make_exception_with_doc", (PyCFunction)make_exception_with_doc,
METH_VARARGS | METH_KEYWORDS},
{"crash_no_current_thread", (PyCFunction)crash_no_current_thread, METH_NOARGS},
- {"format_unicode", format_unicode, METH_VARARGS},
{NULL, NULL} /* sentinel */
};