Add missing tests for PyArg_Parse* with format 'h'
diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c
index c5c2c6b..b68e76d 100644
--- a/Modules/_testcapimodule.c
+++ b/Modules/_testcapimodule.c
@@ -454,6 +454,15 @@
}
static PyObject *
+getargs_h(PyObject *self, PyObject *args)
+{
+ short value;
+ if (!PyArg_ParseTuple(args, "h", &value))
+ return NULL;
+ return PyLong_FromLong((long)value);
+}
+
+static PyObject *
getargs_H(PyObject *self, PyObject *args)
{
unsigned short value;
@@ -1045,6 +1054,7 @@
METH_VARARGS|METH_KEYWORDS},
{"getargs_b", getargs_b, METH_VARARGS},
{"getargs_B", getargs_B, METH_VARARGS},
+ {"getargs_h", getargs_h, METH_VARARGS},
{"getargs_H", getargs_H, METH_VARARGS},
{"getargs_I", getargs_I, METH_VARARGS},
{"getargs_k", getargs_k, METH_VARARGS},