gh-109050: Remove remaining tests for legacy Unicode C API (GH-109068)

This commit is contained in:
Serhiy Storchaka 2023-09-09 08:44:46 +03:00 committed by GitHub
parent 17f994174d
commit b4131a13cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 1 additions and 197 deletions

View file

@ -589,54 +589,6 @@ getargs_y_hash(PyObject *self, PyObject *args)
return PyBytes_FromStringAndSize(str, size);
}
static PyObject *
getargs_u(PyObject *self, PyObject *args)
{
wchar_t *str;
if (!PyArg_ParseTuple(args, "u", &str)) {
return NULL;
}
return PyUnicode_FromWideChar(str, -1);
}
static PyObject *
getargs_u_hash(PyObject *self, PyObject *args)
{
wchar_t *str;
Py_ssize_t size;
if (!PyArg_ParseTuple(args, "u#", &str, &size)) {
return NULL;
}
return PyUnicode_FromWideChar(str, size);
}
static PyObject *
getargs_Z(PyObject *self, PyObject *args)
{
wchar_t *str;
if (!PyArg_ParseTuple(args, "Z", &str)) {
return NULL;
}
if (str != NULL) {
return PyUnicode_FromWideChar(str, -1);
}
Py_RETURN_NONE;
}
static PyObject *
getargs_Z_hash(PyObject *self, PyObject *args)
{
wchar_t *str;
Py_ssize_t size;
if (!PyArg_ParseTuple(args, "Z#", &str, &size)) {
return NULL;
}
if (str != NULL) {
return PyUnicode_FromWideChar(str, size);
}
Py_RETURN_NONE;
}
static PyObject *
getargs_es(PyObject *self, PyObject *args)
{
@ -845,8 +797,6 @@ static PyMethodDef test_methods[] = {
{"getargs_S", getargs_S, METH_VARARGS},
{"getargs_U", getargs_U, METH_VARARGS},
{"getargs_Y", getargs_Y, METH_VARARGS},
{"getargs_Z", getargs_Z, METH_VARARGS},
{"getargs_Z_hash", getargs_Z_hash, METH_VARARGS},
{"getargs_b", getargs_b, METH_VARARGS},
{"getargs_c", getargs_c, METH_VARARGS},
{"getargs_d", getargs_d, METH_VARARGS},
@ -868,8 +818,6 @@ static PyMethodDef test_methods[] = {
{"getargs_s_hash", getargs_s_hash, METH_VARARGS},
{"getargs_s_star", getargs_s_star, METH_VARARGS},
{"getargs_tuple", getargs_tuple, METH_VARARGS},
{"getargs_u", getargs_u, METH_VARARGS},
{"getargs_u_hash", getargs_u_hash, METH_VARARGS},
{"getargs_w_star", getargs_w_star, METH_VARARGS},
{"getargs_y", getargs_y, METH_VARARGS},
{"getargs_y_hash", getargs_y_hash, METH_VARARGS},