*.c: Rearrange and reformat the class methods.
[catacomb-python] / passphrase.c
index 1796629..d7baf74 100644 (file)
@@ -118,7 +118,7 @@ static PyObject *pixmeth_cancel(PyObject *me, PyObject *arg)
   RETURN_ME;
 }
 
-static PyMethodDef pixie_pymethods[] = {
+static const PyMethodDef pixie_pymethods[] = {
 #define METHNAME(name) pixmeth_##name
   KWMETH(read,         "P.read(TAG, [mode = PMODE_READ]) -> STRING")
   METH (set,           "P.set(TAG, PHRASE)")
@@ -152,7 +152,7 @@ static PyTypeObject pixie_pytype_skel = {
     Py_TPFLAGS_BASETYPE,
 
   /* @tp_doc@ */
-"Pixie([socket = ?]): passphrase pixie connection.",
+  "Pixie([socket = ?]): passphrase pixie connection.",
 
   0,                                   /* @tp_traverse@ */
   0,                                   /* @tp_clear@ */
@@ -160,7 +160,7 @@ static PyTypeObject pixie_pytype_skel = {
   0,                                   /* @tp_weaklistoffset@ */
   0,                                   /* @tp_iter@ */
   0,                                   /* @tp_iternext@ */
-  pixie_pymethods,                     /* @tp_methods@ */
+  PYMETHODS(pixie),                    /* @tp_methods@ */
   0,                                   /* @tp_members@ */
   0,                                   /* @tp_getset@ */
   0,                                   /* @tp_base@ */
@@ -220,11 +220,11 @@ end:
   return (rc);
 }
 
-static PyMethodDef methods[] = {
+static const PyMethodDef methods[] = {
 #define METHNAME(name) meth_##name
-  KWMETH(ppread,               "ppread(TAG, [mode = PMODE_READ]) -> STRING")
-  METH (ppcancel,              "ppcancel(TAG)")
-  METH (getpass,               "getpass(PROMPT) -> STRING")
+  KWMETH(ppread,       "ppread(TAG, [mode = PMODE_READ]) -> STRING")
+  METH (ppcancel,      "ppcancel(TAG)")
+  METH (getpass,       "getpass(PROMPT) -> STRING")
 #undef METHNAME
   { 0 }
 };