diff --git a/_pylibmcmodule.c b/_pylibmcmodule.c index 34eba50..2aafa68 100644 --- a/_pylibmcmodule.c +++ b/_pylibmcmodule.c @@ -453,12 +453,12 @@ static PyObject *_PylibMC_RunSetCommandMulti(PylibMC_Client* self, PyObject * retval = NULL; size_t idx = 0; - static char *kws[] = { "keys", "key_prefix", "time", "min_compress_len", NULL }; + static char *kws[] = { "keys", "time", "key_prefix", "min_compress_len", NULL }; - if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!|O!II", kws, + if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!|ISI", kws, &PyDict_Type, &keys, - &PyString_Type, &key_prefix, - &time, &min_compress)) { + &time, &key_prefix, + &min_compress)) { return NULL; } diff --git a/tests.py b/tests.py index f133739..018e5dc 100644 --- a/tests.py +++ b/tests.py @@ -74,11 +74,15 @@ True >>> c.get("hi") >>> c.set("hi", "loretta", int(time()) + 2) True +>>> c.set_multi({"hi2": "charlotta"}, 1) +[] >>> c.get("hi") 'loretta' +>>> c.get("hi2") +'charlotta' >>> sleep(3.1) ->>> c.get("hi") ->>> +>>> c.get("hi"), c.get("hi2") +(None, None) See issue #1 ``http://github.com/lericson/pylibmc/issues/#issue/1`` -- delete should not accept a time argument.