Staging
v0.5.1
https://github.com/python/cpython
Revision eea1449a3426094d35c70a16f260d030624430ef authored by Guido van Rossum on 13 August 1997, 21:30:44 UTC, committed by Guido van Rossum on 13 August 1997, 21:30:44 UTC
is now obsolete), and changed the default path calculations.
$PYTHONPATH is now added as a prefix (like it's always been on Unix);
$PYTHONHOME takes precedence over the program pathname; and only one
landmark is needed.
1 parent 407a22d
Raw File
Tip revision: eea1449a3426094d35c70a16f260d030624430ef authored by Guido van Rossum on 13 August 1997, 21:30:44 UTC
Much rewritten. Added Win32 registry stuff (from getpath_nt.c, which
Tip revision: eea1449
cryptmodule.c
/* cryptmodule.c - by Steve Majewski
 */

#include "Python.h"

#include <sys/types.h>


/* Module crypt */


static PyObject *crypt_crypt(self, args)
	PyObject *self, *args;
{
	char *word, *salt; 
	extern char * crypt();

	if (!PyArg_Parse(args, "(ss)", &word, &salt)) {
		return NULL;
	}
	return PyString_FromString( crypt( word, salt ) );

}

static PyMethodDef crypt_methods[] = {
	{"crypt",	crypt_crypt},
	{NULL,		NULL}		/* sentinel */
};

void
initcrypt()
{
	Py_InitModule("crypt", crypt_methods);
}
back to top