Add a test for a bad format character.

This commit is contained in:
Guido van Rossum 1997-12-09 20:37:25 +00:00
parent 231a41e708
commit c525e43b42
1 changed files with 16 additions and 0 deletions

View File

@ -208,10 +208,26 @@ xx_bug(self, args)
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 */
static PyMethodDef xx_methods[] = {
{"roj", xx_roj, 1},
{"foo", xx_foo, 1},
{"new", xx_new, 1},
{"bug", xx_bug, 1},