File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 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
3030void
3131initcrypt ()
3232{
33- initmodule ("crypt" , crypt_methods );
33+ Py_InitModule ("crypt" , crypt_methods );
3434}
You can’t perform that action at this time.
0 commit comments