diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-01-05 00:19:28 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-01-05 00:19:28 (GMT) |
commit | ca1e7ec3444c372335c96f83d1550b16b0783557 (patch) | |
tree | 5cab60903900be4f45de13d8faaf6dd17ee83147 /Modules | |
parent | 1ec121d0d19b0ab55cead5974d126fb9b0f95938 (diff) | |
download | cpython-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')
-rw-r--r-- | Modules/_testcapimodule.c | 12 |
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 */ }; |