summaryrefslogtreecommitdiffstats
path: root/Modules/rotormodule.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1995-01-10 20:56:29 (GMT)
committerGuido van Rossum <guido@python.org>1995-01-10 20:56:29 (GMT)
commita597dde3f1959127c33296a77f76331b59449c01 (patch)
tree1b41173d59525e5c16ea772aaa60dc0c123dc409 /Modules/rotormodule.c
parent6c1874fc2bd0e0d2e30de78fe1f1fe8bcf8a20be (diff)
downloadcpython-a597dde3f1959127c33296a77f76331b59449c01.zip
cpython-a597dde3f1959127c33296a77f76331b59449c01.tar.gz
cpython-a597dde3f1959127c33296a77f76331b59449c01.tar.bz2
cosmetic changes so these modules will work with the strict new naming scheme
Diffstat (limited to 'Modules/rotormodule.c')
-rw-r--r--Modules/rotormodule.c10
1 files changed, 5 insertions, 5 deletions
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 @@ NOTE: you MUST use the SAME key in rotor.newrotor()
#include "Python.h"
-#include <stdio.h>
#include <math.h>
+
#define TRUE 1
#define FALSE 0
@@ -217,7 +217,7 @@ PyRotor_New(num_rotors, key)
goto fail;
return xp;
fail:
- DECREF(xp);
+ Py_DECREF(xp);
return (PyRotorObject *)PyErr_NoMemory();
}
@@ -736,7 +736,7 @@ PyRotor_SetKey(self, args)
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 @@ PyRotor_GetAttr(s, name)
}
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 @@ PyRotor_Rotor(self, args)
return (PyObject * )r;
}
-static struct methodlist PyRotor_Rotor_Methods[] = {
+static struct PyMethodDef PyRotor_Rotor_Methods[] = {
{"newrotor", (PyCFunction)PyRotor_Rotor},
{NULL, NULL} /* Sentinel */
};