Skip to content

Commit 3ee126a

Browse files
author
rmasse
committed
renamed grandly.
git-svn-id: http://svn.python.org/projects/python/trunk@7118 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent bd4dabb commit 3ee126a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Modules/cryptmodule.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
11
/* cryptmodule.c - by Steve Majewski
22
*/
33

4-
#include "allobjects.h"
4+
#include "Python.h"
55

66
#include <sys/types.h>
77

88

99
/* Module crypt */
1010

1111

12-
static object *crypt_crypt(self, args)
13-
object *self, *args;
12+
static PyObject *crypt_crypt(self, args)
13+
PyObject *self, *args;
1414
{
1515
char *word, *salt;
1616
extern char * crypt();
1717

18-
if (!getargs(args, "(ss)", &word, &salt)) {
18+
if (!PyArg_Parse(args, "(ss)", &word, &salt)) {
1919
return NULL;
2020
}
21-
return newstringobject( crypt( word, salt ) );
21+
return PyString_FromString( crypt( word, salt ) );
2222

2323
}
2424

25-
static struct methodlist crypt_methods[] = {
25+
static PyMethodDef crypt_methods[] = {
2626
{"crypt", crypt_crypt},
2727
{NULL, NULL} /* sentinel */
2828
};
2929

3030
void
3131
initcrypt()
3232
{
33-
initmodule("crypt", crypt_methods);
33+
Py_InitModule("crypt", crypt_methods);
3434
}

0 commit comments

Comments
 (0)