mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +00:00
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' ........
This commit is contained in:
parent
808ff2c9d1
commit
1554b18b5a
2 changed files with 26 additions and 1 deletions
|
|
@ -454,6 +454,15 @@ getargs_B(PyObject *self, PyObject *args)
|
|||
return PyLong_FromUnsignedLong((unsigned long)value);
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
|
|
@ -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},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue