mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-31 09:42:27 +00:00
Perform build and magnum tuning
Building o//third_party/python now takes 5 seconds on my PC This change works towards modifying Python to use runtime dispatching when appropriate. For example, when loading the magnums in the socket module, it's a good idea to check if the magnum is zero, because that means the local system platform doesn't support it.
This commit is contained in:
parent
ee7e296339
commit
d26d7ae0e4
1028 changed files with 6576 additions and 172777 deletions
39
third_party/python/Modules/clinic/_cryptmodule.inc
vendored
Normal file
39
third_party/python/Modules/clinic/_cryptmodule.inc
vendored
Normal file
|
@ -0,0 +1,39 @@
|
|||
/* clang-format off */
|
||||
/*[clinic input]
|
||||
preserve
|
||||
[clinic start generated code]*/
|
||||
|
||||
PyDoc_STRVAR(crypt_crypt__doc__,
|
||||
"crypt($module, word, salt, /)\n"
|
||||
"--\n"
|
||||
"\n"
|
||||
"Hash a *word* with the given *salt* and return the hashed password.\n"
|
||||
"\n"
|
||||
"*word* will usually be a user\'s password. *salt* (either a random 2 or 16\n"
|
||||
"character string, possibly prefixed with $digit$ to indicate the method)\n"
|
||||
"will be used to perturb the encryption algorithm and produce distinct\n"
|
||||
"results for a given *word*.");
|
||||
|
||||
#define CRYPT_CRYPT_METHODDEF \
|
||||
{"crypt", (PyCFunction)crypt_crypt, METH_VARARGS, crypt_crypt__doc__},
|
||||
|
||||
static PyObject *
|
||||
crypt_crypt_impl(PyObject *module, const char *word, const char *salt);
|
||||
|
||||
static PyObject *
|
||||
crypt_crypt(PyObject *module, PyObject *args)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
const char *word;
|
||||
const char *salt;
|
||||
|
||||
if (!PyArg_ParseTuple(args, "ss:crypt",
|
||||
&word, &salt)) {
|
||||
goto exit;
|
||||
}
|
||||
return_value = crypt_crypt_impl(module, word, salt);
|
||||
|
||||
exit:
|
||||
return return_value;
|
||||
}
|
||||
/*[clinic end generated code: output=8dfc88264e662df4 input=a9049054013a1b77]*/
|
Loading…
Add table
Add a link
Reference in a new issue