summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-12-09 20:37:25 (GMT)
committerGuido van Rossum <guido@python.org>1997-12-09 20:37:25 (GMT)
commitc525e43b426bc56c775bd0976bebb6f5632f0b3c (patch)
tree1b86b077ea10b3a0759f4418aeb8a2de8d3c0522
parent231a41e7085d85591eb5361335a5cc2661c16aa1 (diff)
downloadcpython-c525e43b426bc56c775bd0976bebb6f5632f0b3c.zip
cpython-c525e43b426bc56c775bd0976bebb6f5632f0b3c.tar.gz
cpython-c525e43b426bc56c775bd0976bebb6f5632f0b3c.tar.bz2
Add a test for a bad format character.
-rw-r--r--Modules/xxmodule.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/Modules/xxmodule.c b/Modules/xxmodule.c
index 792ef3f..8de3c5d 100644
--- a/Modules/xxmodule.c
+++ b/Modules/xxmodule.c
@@ -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},