]> granicus.if.org Git - python/commitdiff
Add a test for a bad format character.
authorGuido van Rossum <guido@python.org>
Tue, 9 Dec 1997 20:37:25 +0000 (20:37 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 9 Dec 1997 20:37:25 +0000 (20:37 +0000)
Modules/xxmodule.c

index 792ef3f3bb0b31db98db26d5146197f185346a8a..8de3c5d3cf97d8ee8e6310136a1b2dbefb4bfdd4 100644 (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},