Fix void / None Python bindings.
authorMilan Broz <gmazyland@gmail.com>
Mon, 7 Nov 2011 12:22:33 +0000 (12:22 +0000)
committerMilan Broz <gmazyland@gmail.com>
Mon, 7 Nov 2011 12:22:33 +0000 (12:22 +0000)
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@677 36d66b0a-2a48-0410-832c-cd162a569da5

python/pycryptsetup.c

index f7aff6b..fe361a7 100644 (file)
@@ -567,7 +567,8 @@ static PyObject *CryptSetup_debugLevel(CryptSetupObject* self, PyObject *args, P
                return NULL;
 
        crypt_set_debug_level(level);
-       return PyObjectResult(0);
+
+       Py_RETURN_NONE;
 }
 
 #define CryptSetup_iterationTime_HELP "Set iteration time\n\n\
@@ -579,11 +580,12 @@ static PyObject *CryptSetup_iterationTime(CryptSetupObject* self, PyObject *args
        static char *kwlist[] = {"time_ms", NULL};
        uint64_t time_ms = 0;
 
-       if (!PyArg_ParseTupleAndKeywords(args, kwds, "l", kwlist, &time_ms))
+       if (!PyArg_ParseTupleAndKeywords(args, kwds, "K", kwlist, &time_ms))
                return NULL;
 
        crypt_set_iteration_time(self->device, time_ms);
-       return PyObjectResult(0);
+
+       Py_RETURN_NONE;
 }
 
 static PyMemberDef CryptSetup_members[] = {