Merged revisions 76930 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r76930 | mark.dickinson | 2009-12-20 15:57:56 +0000 (Sun, 20 Dec 2009) | 1 line

  Add missing tests for PyArg_Parse* with format 'h'
........
diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c
index 6244f3f..70da707 100644
--- a/Modules/_testcapimodule.c
+++ b/Modules/_testcapimodule.c
@@ -455,6 +455,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;
@@ -1566,6 +1575,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},