mirror of
https://github.com/python/cpython.git
synced 2024-12-05 07:43:50 +08:00
6f6a4e6cc5
We only statically initialize for core code and builtin modules. Extension modules still create the tuple at runtime. We'll solve that part of interpreter isolation separately. This change includes generated code. The non-generated changes are in: * Tools/clinic/clinic.py * Python/getargs.c * Include/cpython/modsupport.h * Makefile.pre.in (re-generate global strings after running clinic) * very minor tweaks to Modules/_codecsmodule.c and Python/Python-tokenize.c All other changes are generated code (clinic, global strings).
81 lines
2.0 KiB
C
Generated
81 lines
2.0 KiB
C
Generated
/*[clinic input]
|
|
preserve
|
|
[clinic start generated code]*/
|
|
|
|
#if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
|
|
# include "pycore_gc.h" // PyGC_Head
|
|
# include "pycore_runtime.h" // _Py_ID()
|
|
#endif
|
|
|
|
|
|
#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 (!PyUnicode_Check(arg_)) {
|
|
_PyArg_BadArgument("getspnam", "argument", "str", arg_);
|
|
goto exit;
|
|
}
|
|
if (PyUnicode_READY(arg_) == -1) {
|
|
goto exit;
|
|
}
|
|
arg = arg_;
|
|
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=dd61827a7b708e11 input=a9049054013a1b77]*/
|