mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-29 16:52:28 +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
70
third_party/python/Modules/clinic/spwdmodule.inc
vendored
Normal file
70
third_party/python/Modules/clinic/spwdmodule.inc
vendored
Normal file
|
@ -0,0 +1,70 @@
|
|||
/* clang-format off */
|
||||
/*[clinic input]
|
||||
preserve
|
||||
[clinic start generated code]*/
|
||||
|
||||
#if defined(HAVE_GETSPNAM)
|
||||
|
||||
PyDoc_STRVAR(spwd_getspnam__doc__,
|
||||
"getspnam($module, arg, /)\n"
|
||||
"--\n"
|
||||
"\n"
|
||||
"Return the shadow password database entry for the given user name.\n"
|
||||
"\n"
|
||||
"See `help(spwd)` for more on shadow password database entries.");
|
||||
|
||||
#define SPWD_GETSPNAM_METHODDEF \
|
||||
{"getspnam", (PyCFunction)spwd_getspnam, METH_O, spwd_getspnam__doc__},
|
||||
|
||||
static PyObject *
|
||||
spwd_getspnam_impl(PyObject *module, PyObject *arg);
|
||||
|
||||
static PyObject *
|
||||
spwd_getspnam(PyObject *module, PyObject *arg_)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
PyObject *arg;
|
||||
|
||||
if (!PyArg_Parse(arg_, "U:getspnam", &arg)) {
|
||||
goto exit;
|
||||
}
|
||||
return_value = spwd_getspnam_impl(module, arg);
|
||||
|
||||
exit:
|
||||
return return_value;
|
||||
}
|
||||
|
||||
#endif /* defined(HAVE_GETSPNAM) */
|
||||
|
||||
#if defined(HAVE_GETSPENT)
|
||||
|
||||
PyDoc_STRVAR(spwd_getspall__doc__,
|
||||
"getspall($module, /)\n"
|
||||
"--\n"
|
||||
"\n"
|
||||
"Return a list of all available shadow password database entries, in arbitrary order.\n"
|
||||
"\n"
|
||||
"See `help(spwd)` for more on shadow password database entries.");
|
||||
|
||||
#define SPWD_GETSPALL_METHODDEF \
|
||||
{"getspall", (PyCFunction)spwd_getspall, METH_NOARGS, spwd_getspall__doc__},
|
||||
|
||||
static PyObject *
|
||||
spwd_getspall_impl(PyObject *module);
|
||||
|
||||
static PyObject *
|
||||
spwd_getspall(PyObject *module, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
return spwd_getspall_impl(module);
|
||||
}
|
||||
|
||||
#endif /* defined(HAVE_GETSPENT) */
|
||||
|
||||
#ifndef SPWD_GETSPNAM_METHODDEF
|
||||
#define SPWD_GETSPNAM_METHODDEF
|
||||
#endif /* !defined(SPWD_GETSPNAM_METHODDEF) */
|
||||
|
||||
#ifndef SPWD_GETSPALL_METHODDEF
|
||||
#define SPWD_GETSPALL_METHODDEF
|
||||
#endif /* !defined(SPWD_GETSPALL_METHODDEF) */
|
||||
/*[clinic end generated code: output=07cd8af0afd77fe7 input=a9049054013a1b77]*/
|
Loading…
Add table
Add a link
Reference in a new issue