summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2009-12-20 16:03:30 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2009-12-20 16:03:30 (GMT)
commit1554b18b5aad4547574f680761da047d356b30b4 (patch)
tree9d235981894216d6f0d2e00bebd27e33c6274831 /Modules
parent808ff2c9d17a3d4ac94e49948a6f15bcf810282d (diff)
downloadcpython-1554b18b5aad4547574f680761da047d356b30b4.zip
cpython-1554b18b5aad4547574f680761da047d356b30b4.tar.gz
cpython-1554b18b5aad4547574f680761da047d356b30b4.tar.bz2
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' ........
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_testcapimodule.c10
1 files changed, 10 insertions, 0 deletions
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 @@ getargs_B(PyObject *self, PyObject *args)
}
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 @@ static PyMethodDef TestMethods[] = {
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},