]> granicus.if.org Git - python/commitdiff
rotorobj_setkey(): A single string argument is now required (i.e. no
authorBarry Warsaw <barry@python.org>
Thu, 2 Jan 1997 20:36:36 +0000 (20:36 +0000)
committerBarry Warsaw <barry@python.org>
Thu, 2 Jan 1997 20:36:36 +0000 (20:36 +0000)
long optional with nearly-no-op missing).

Modules/rotormodule.c

index d0da590cede1de4f66ae8f73d6a2756f549446ea..1985e4c2edfba453a1d62219393a3415b603ea72 100644 (file)
@@ -767,14 +767,12 @@ rotorobj_setkey(self, args)
        Rotorobj *self;
        PyObject * args;
 {
-       char *string = NULL;
+       char *key;
 
-       if (!PyArg_ParseTuple(args, "|s", &string))
+       if (!PyArg_ParseTuple(args, "s", &key))
                return NULL;
 
-       if (string)
-               set_key(self, string);
-
+       set_key(self, key);
        Py_INCREF(Py_None);
        return Py_None;
 }