mirror of
https://github.com/python/cpython.git
synced 2025-07-21 10:15:46 +00:00
Add a test for a bad format character.
This commit is contained in:
parent
231a41e708
commit
c525e43b42
1 changed files with 16 additions and 0 deletions
|
@ -208,10 +208,26 @@ xx_bug(self, args)
|
||||||
return Py_None;
|
return Py_None;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Test bad format character */
|
||||||
|
|
||||||
|
static PyObject *
|
||||||
|
xx_roj(self, args)
|
||||||
|
PyObject *self; /* Not used */
|
||||||
|
PyObject *args;
|
||||||
|
{
|
||||||
|
PyObject *a;
|
||||||
|
long b;
|
||||||
|
if (!PyArg_ParseTuple(args, "O#", &a, &b))
|
||||||
|
return NULL;
|
||||||
|
Py_INCREF(Py_None);
|
||||||
|
return Py_None;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* List of functions defined in the module */
|
/* List of functions defined in the module */
|
||||||
|
|
||||||
static PyMethodDef xx_methods[] = {
|
static PyMethodDef xx_methods[] = {
|
||||||
|
{"roj", xx_roj, 1},
|
||||||
{"foo", xx_foo, 1},
|
{"foo", xx_foo, 1},
|
||||||
{"new", xx_new, 1},
|
{"new", xx_new, 1},
|
||||||
{"bug", xx_bug, 1},
|
{"bug", xx_bug, 1},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue