cosmetic changes so these modules will work with the strict new naming scheme
diff --git a/Modules/rotormodule.c b/Modules/rotormodule.c
index cb70612..60d9257 100644
--- a/Modules/rotormodule.c
+++ b/Modules/rotormodule.c
@@ -57,8 +57,8 @@
#include "Python.h"
-#include <stdio.h>
#include <math.h>
+
#define TRUE 1
#define FALSE 0
@@ -217,7 +217,7 @@
goto fail;
return xp;
fail:
- DECREF(xp);
+ Py_DECREF(xp);
return (PyRotorObject *)PyErr_NoMemory();
}
@@ -736,7 +736,7 @@
return Py_None;
}
-static struct methodlist PyRotor_Methods[] = {
+static struct PyMethodDef PyRotor_Methods[] = {
{"encrypt", (PyCFunction)PyRotor_Encrypt},
{"encryptmore", (PyCFunction)PyRotor_EncryptMore},
{"decrypt", (PyCFunction)PyRotor_Decrypt},
@@ -756,7 +756,7 @@
}
static PyTypeObject PyRotor_Type = {
- PyObject_HEAD_INIT(&Typetype)
+ PyObject_HEAD_INIT(&PyType_Type)
0, /*ob_size*/
"rotor", /*tp_name*/
sizeof(PyRotorObject), /*tp_size*/
@@ -793,7 +793,7 @@
return (PyObject * )r;
}
-static struct methodlist PyRotor_Rotor_Methods[] = {
+static struct PyMethodDef PyRotor_Rotor_Methods[] = {
{"newrotor", (PyCFunction)PyRotor_Rotor},
{NULL, NULL} /* Sentinel */
};