summaryrefslogtreecommitdiffstats
path: root/Modules/cryptmodule.c
diff options
context:
space:
mode:
authorRoger E. Masse <rmasse@newcnri.cnri.reston.va.us>1996-12-09 23:14:26 (GMT)
committerRoger E. Masse <rmasse@newcnri.cnri.reston.va.us>1996-12-09 23:14:26 (GMT)
commit56c345b23561c14c6aad48284a984cc629c90f2f (patch)
tree67be16e914ea2b6278843de4c95d68b4759096f2 /Modules/cryptmodule.c
parent75362381b5deed5c90efc663a862631da0e8cb2c (diff)
downloadcpython-56c345b23561c14c6aad48284a984cc629c90f2f.zip
cpython-56c345b23561c14c6aad48284a984cc629c90f2f.tar.gz
cpython-56c345b23561c14c6aad48284a984cc629c90f2f.tar.bz2
renamed grandly.
Diffstat (limited to 'Modules/cryptmodule.c')
-rw-r--r--Modules/cryptmodule.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/Modules/cryptmodule.c b/Modules/cryptmodule.c
index 84f05b1..1498bb0 100644
--- a/Modules/cryptmodule.c
+++ b/Modules/cryptmodule.c
@@ -1,7 +1,7 @@
/* cryptmodule.c - by Steve Majewski
*/
-#include "allobjects.h"
+#include "Python.h"
#include <sys/types.h>
@@ -9,20 +9,20 @@
/* Module crypt */
-static object *crypt_crypt(self, args)
- object *self, *args;
+static PyObject *crypt_crypt(self, args)
+ PyObject *self, *args;
{
char *word, *salt;
extern char * crypt();
- if (!getargs(args, "(ss)", &word, &salt)) {
+ if (!PyArg_Parse(args, "(ss)", &word, &salt)) {
return NULL;
}
- return newstringobject( crypt( word, salt ) );
+ return PyString_FromString( crypt( word, salt ) );
}
-static struct methodlist crypt_methods[] = {
+static PyMethodDef crypt_methods[] = {
{"crypt", crypt_crypt},
{NULL, NULL} /* sentinel */
};
@@ -30,5 +30,5 @@ static struct methodlist crypt_methods[] = {
void
initcrypt()
{
- initmodule("crypt", crypt_methods);
+ Py_InitModule("crypt", crypt_methods);
}