summaryrefslogtreecommitdiffstats
path: root/Modules/clinic/posixmodule.c.h
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/clinic/posixmodule.c.h')
-rw-r--r--Modules/clinic/posixmodule.c.h383
1 files changed, 192 insertions, 191 deletions
diff --git a/Modules/clinic/posixmodule.c.h b/Modules/clinic/posixmodule.c.h
index 6088eec..fdb3970 100644
--- a/Modules/clinic/posixmodule.c.h
+++ b/Modules/clinic/posixmodule.c.h
@@ -27,13 +27,13 @@ PyDoc_STRVAR(os_stat__doc__,
" an open file descriptor.");
#define OS_STAT_METHODDEF \
- {"stat", (PyCFunction)os_stat, METH_VARARGS|METH_KEYWORDS, os_stat__doc__},
+ {"stat", (PyCFunction)os_stat, METH_FASTCALL, os_stat__doc__},
static PyObject *
os_stat_impl(PyObject *module, path_t *path, int dir_fd, int follow_symlinks);
static PyObject *
-os_stat(PyObject *module, PyObject *args, PyObject *kwargs)
+os_stat(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"path", "dir_fd", "follow_symlinks", NULL};
@@ -42,7 +42,7 @@ os_stat(PyObject *module, PyObject *args, PyObject *kwargs)
int dir_fd = DEFAULT_DIR_FD;
int follow_symlinks = 1;
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
path_converter, &path, FSTATAT_DIR_FD_CONVERTER, &dir_fd, &follow_symlinks)) {
goto exit;
}
@@ -65,13 +65,13 @@ PyDoc_STRVAR(os_lstat__doc__,
"Equivalent to stat(path, follow_symlinks=False).");
#define OS_LSTAT_METHODDEF \
- {"lstat", (PyCFunction)os_lstat, METH_VARARGS|METH_KEYWORDS, os_lstat__doc__},
+ {"lstat", (PyCFunction)os_lstat, METH_FASTCALL, os_lstat__doc__},
static PyObject *
os_lstat_impl(PyObject *module, path_t *path, int dir_fd);
static PyObject *
-os_lstat(PyObject *module, PyObject *args, PyObject *kwargs)
+os_lstat(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"path", "dir_fd", NULL};
@@ -79,7 +79,7 @@ os_lstat(PyObject *module, PyObject *args, PyObject *kwargs)
path_t path = PATH_T_INITIALIZE("lstat", "path", 0, 0);
int dir_fd = DEFAULT_DIR_FD;
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
path_converter, &path, FSTATAT_DIR_FD_CONVERTER, &dir_fd)) {
goto exit;
}
@@ -125,14 +125,14 @@ PyDoc_STRVAR(os_access__doc__,
" has the specified access to the path.");
#define OS_ACCESS_METHODDEF \
- {"access", (PyCFunction)os_access, METH_VARARGS|METH_KEYWORDS, os_access__doc__},
+ {"access", (PyCFunction)os_access, METH_FASTCALL, os_access__doc__},
static int
os_access_impl(PyObject *module, path_t *path, int mode, int dir_fd,
int effective_ids, int follow_symlinks);
static PyObject *
-os_access(PyObject *module, PyObject *args, PyObject *kwargs)
+os_access(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"path", "mode", "dir_fd", "effective_ids", "follow_symlinks", NULL};
@@ -144,7 +144,7 @@ os_access(PyObject *module, PyObject *args, PyObject *kwargs)
int follow_symlinks = 1;
int _return_value;
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
path_converter, &path, &mode, FACCESSAT_DIR_FD_CONVERTER, &dir_fd, &effective_ids, &follow_symlinks)) {
goto exit;
}
@@ -233,20 +233,20 @@ PyDoc_STRVAR(os_chdir__doc__,
" If this functionality is unavailable, using it raises an exception.");
#define OS_CHDIR_METHODDEF \
- {"chdir", (PyCFunction)os_chdir, METH_VARARGS|METH_KEYWORDS, os_chdir__doc__},
+ {"chdir", (PyCFunction)os_chdir, METH_FASTCALL, os_chdir__doc__},
static PyObject *
os_chdir_impl(PyObject *module, path_t *path);
static PyObject *
-os_chdir(PyObject *module, PyObject *args, PyObject *kwargs)
+os_chdir(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"path", NULL};
static _PyArg_Parser _parser = {"O&:chdir", _keywords, 0};
path_t path = PATH_T_INITIALIZE("chdir", "path", 0, PATH_HAVE_FCHDIR);
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
path_converter, &path)) {
goto exit;
}
@@ -271,20 +271,20 @@ PyDoc_STRVAR(os_fchdir__doc__,
"Equivalent to os.chdir(fd).");
#define OS_FCHDIR_METHODDEF \
- {"fchdir", (PyCFunction)os_fchdir, METH_VARARGS|METH_KEYWORDS, os_fchdir__doc__},
+ {"fchdir", (PyCFunction)os_fchdir, METH_FASTCALL, os_fchdir__doc__},
static PyObject *
os_fchdir_impl(PyObject *module, int fd);
static PyObject *
-os_fchdir(PyObject *module, PyObject *args, PyObject *kwargs)
+os_fchdir(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"fd", NULL};
static _PyArg_Parser _parser = {"O&:fchdir", _keywords, 0};
int fd;
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
fildes_converter, &fd)) {
goto exit;
}
@@ -323,14 +323,14 @@ PyDoc_STRVAR(os_chmod__doc__,
" If they are unavailable, using them will raise a NotImplementedError.");
#define OS_CHMOD_METHODDEF \
- {"chmod", (PyCFunction)os_chmod, METH_VARARGS|METH_KEYWORDS, os_chmod__doc__},
+ {"chmod", (PyCFunction)os_chmod, METH_FASTCALL, os_chmod__doc__},
static PyObject *
os_chmod_impl(PyObject *module, path_t *path, int mode, int dir_fd,
int follow_symlinks);
static PyObject *
-os_chmod(PyObject *module, PyObject *args, PyObject *kwargs)
+os_chmod(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"path", "mode", "dir_fd", "follow_symlinks", NULL};
@@ -340,7 +340,7 @@ os_chmod(PyObject *module, PyObject *args, PyObject *kwargs)
int dir_fd = DEFAULT_DIR_FD;
int follow_symlinks = 1;
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
path_converter, &path, &mode, FCHMODAT_DIR_FD_CONVERTER, &dir_fd, &follow_symlinks)) {
goto exit;
}
@@ -364,13 +364,13 @@ PyDoc_STRVAR(os_fchmod__doc__,
"Equivalent to os.chmod(fd, mode).");
#define OS_FCHMOD_METHODDEF \
- {"fchmod", (PyCFunction)os_fchmod, METH_VARARGS|METH_KEYWORDS, os_fchmod__doc__},
+ {"fchmod", (PyCFunction)os_fchmod, METH_FASTCALL, os_fchmod__doc__},
static PyObject *
os_fchmod_impl(PyObject *module, int fd, int mode);
static PyObject *
-os_fchmod(PyObject *module, PyObject *args, PyObject *kwargs)
+os_fchmod(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"fd", "mode", NULL};
@@ -378,7 +378,7 @@ os_fchmod(PyObject *module, PyObject *args, PyObject *kwargs)
int fd;
int mode;
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
&fd, &mode)) {
goto exit;
}
@@ -402,13 +402,13 @@ PyDoc_STRVAR(os_lchmod__doc__,
"Equivalent to chmod(path, mode, follow_symlinks=False).\"");
#define OS_LCHMOD_METHODDEF \
- {"lchmod", (PyCFunction)os_lchmod, METH_VARARGS|METH_KEYWORDS, os_lchmod__doc__},
+ {"lchmod", (PyCFunction)os_lchmod, METH_FASTCALL, os_lchmod__doc__},
static PyObject *
os_lchmod_impl(PyObject *module, path_t *path, int mode);
static PyObject *
-os_lchmod(PyObject *module, PyObject *args, PyObject *kwargs)
+os_lchmod(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"path", "mode", NULL};
@@ -416,7 +416,7 @@ os_lchmod(PyObject *module, PyObject *args, PyObject *kwargs)
path_t path = PATH_T_INITIALIZE("lchmod", "path", 0, 0);
int mode;
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
path_converter, &path, &mode)) {
goto exit;
}
@@ -446,14 +446,14 @@ PyDoc_STRVAR(os_chflags__doc__,
"unavailable, using it will raise a NotImplementedError.");
#define OS_CHFLAGS_METHODDEF \
- {"chflags", (PyCFunction)os_chflags, METH_VARARGS|METH_KEYWORDS, os_chflags__doc__},
+ {"chflags", (PyCFunction)os_chflags, METH_FASTCALL, os_chflags__doc__},
static PyObject *
os_chflags_impl(PyObject *module, path_t *path, unsigned long flags,
int follow_symlinks);
static PyObject *
-os_chflags(PyObject *module, PyObject *args, PyObject *kwargs)
+os_chflags(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"path", "flags", "follow_symlinks", NULL};
@@ -462,7 +462,7 @@ os_chflags(PyObject *module, PyObject *args, PyObject *kwargs)
unsigned long flags;
int follow_symlinks = 1;
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
path_converter, &path, &flags, &follow_symlinks)) {
goto exit;
}
@@ -489,13 +489,13 @@ PyDoc_STRVAR(os_lchflags__doc__,
"Equivalent to chflags(path, flags, follow_symlinks=False).");
#define OS_LCHFLAGS_METHODDEF \
- {"lchflags", (PyCFunction)os_lchflags, METH_VARARGS|METH_KEYWORDS, os_lchflags__doc__},
+ {"lchflags", (PyCFunction)os_lchflags, METH_FASTCALL, os_lchflags__doc__},
static PyObject *
os_lchflags_impl(PyObject *module, path_t *path, unsigned long flags);
static PyObject *
-os_lchflags(PyObject *module, PyObject *args, PyObject *kwargs)
+os_lchflags(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"path", "flags", NULL};
@@ -503,7 +503,7 @@ os_lchflags(PyObject *module, PyObject *args, PyObject *kwargs)
path_t path = PATH_T_INITIALIZE("lchflags", "path", 0, 0);
unsigned long flags;
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
path_converter, &path, &flags)) {
goto exit;
}
@@ -527,20 +527,20 @@ PyDoc_STRVAR(os_chroot__doc__,
"Change root directory to path.");
#define OS_CHROOT_METHODDEF \
- {"chroot", (PyCFunction)os_chroot, METH_VARARGS|METH_KEYWORDS, os_chroot__doc__},
+ {"chroot", (PyCFunction)os_chroot, METH_FASTCALL, os_chroot__doc__},
static PyObject *
os_chroot_impl(PyObject *module, path_t *path);
static PyObject *
-os_chroot(PyObject *module, PyObject *args, PyObject *kwargs)
+os_chroot(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"path", NULL};
static _PyArg_Parser _parser = {"O&:chroot", _keywords, 0};
path_t path = PATH_T_INITIALIZE("chroot", "path", 0, 0);
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
path_converter, &path)) {
goto exit;
}
@@ -564,20 +564,20 @@ PyDoc_STRVAR(os_fsync__doc__,
"Force write of fd to disk.");
#define OS_FSYNC_METHODDEF \
- {"fsync", (PyCFunction)os_fsync, METH_VARARGS|METH_KEYWORDS, os_fsync__doc__},
+ {"fsync", (PyCFunction)os_fsync, METH_FASTCALL, os_fsync__doc__},
static PyObject *
os_fsync_impl(PyObject *module, int fd);
static PyObject *
-os_fsync(PyObject *module, PyObject *args, PyObject *kwargs)
+os_fsync(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"fd", NULL};
static _PyArg_Parser _parser = {"O&:fsync", _keywords, 0};
int fd;
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
fildes_converter, &fd)) {
goto exit;
}
@@ -620,20 +620,20 @@ PyDoc_STRVAR(os_fdatasync__doc__,
"Force write of fd to disk without forcing update of metadata.");
#define OS_FDATASYNC_METHODDEF \
- {"fdatasync", (PyCFunction)os_fdatasync, METH_VARARGS|METH_KEYWORDS, os_fdatasync__doc__},
+ {"fdatasync", (PyCFunction)os_fdatasync, METH_FASTCALL, os_fdatasync__doc__},
static PyObject *
os_fdatasync_impl(PyObject *module, int fd);
static PyObject *
-os_fdatasync(PyObject *module, PyObject *args, PyObject *kwargs)
+os_fdatasync(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"fd", NULL};
static _PyArg_Parser _parser = {"O&:fdatasync", _keywords, 0};
int fd;
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
fildes_converter, &fd)) {
goto exit;
}
@@ -678,14 +678,14 @@ PyDoc_STRVAR(os_chown__doc__,
" If they are unavailable, using them will raise a NotImplementedError.");
#define OS_CHOWN_METHODDEF \
- {"chown", (PyCFunction)os_chown, METH_VARARGS|METH_KEYWORDS, os_chown__doc__},
+ {"chown", (PyCFunction)os_chown, METH_FASTCALL, os_chown__doc__},
static PyObject *
os_chown_impl(PyObject *module, path_t *path, uid_t uid, gid_t gid,
int dir_fd, int follow_symlinks);
static PyObject *
-os_chown(PyObject *module, PyObject *args, PyObject *kwargs)
+os_chown(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"path", "uid", "gid", "dir_fd", "follow_symlinks", NULL};
@@ -696,7 +696,7 @@ os_chown(PyObject *module, PyObject *args, PyObject *kwargs)
int dir_fd = DEFAULT_DIR_FD;
int follow_symlinks = 1;
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
path_converter, &path, _Py_Uid_Converter, &uid, _Py_Gid_Converter, &gid, FCHOWNAT_DIR_FD_CONVERTER, &dir_fd, &follow_symlinks)) {
goto exit;
}
@@ -722,13 +722,13 @@ PyDoc_STRVAR(os_fchown__doc__,
"Equivalent to os.chown(fd, uid, gid).");
#define OS_FCHOWN_METHODDEF \
- {"fchown", (PyCFunction)os_fchown, METH_VARARGS|METH_KEYWORDS, os_fchown__doc__},
+ {"fchown", (PyCFunction)os_fchown, METH_FASTCALL, os_fchown__doc__},
static PyObject *
os_fchown_impl(PyObject *module, int fd, uid_t uid, gid_t gid);
static PyObject *
-os_fchown(PyObject *module, PyObject *args, PyObject *kwargs)
+os_fchown(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"fd", "uid", "gid", NULL};
@@ -737,7 +737,7 @@ os_fchown(PyObject *module, PyObject *args, PyObject *kwargs)
uid_t uid;
gid_t gid;
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
&fd, _Py_Uid_Converter, &uid, _Py_Gid_Converter, &gid)) {
goto exit;
}
@@ -761,13 +761,13 @@ PyDoc_STRVAR(os_lchown__doc__,
"Equivalent to os.chown(path, uid, gid, follow_symlinks=False).");
#define OS_LCHOWN_METHODDEF \
- {"lchown", (PyCFunction)os_lchown, METH_VARARGS|METH_KEYWORDS, os_lchown__doc__},
+ {"lchown", (PyCFunction)os_lchown, METH_FASTCALL, os_lchown__doc__},
static PyObject *
os_lchown_impl(PyObject *module, path_t *path, uid_t uid, gid_t gid);
static PyObject *
-os_lchown(PyObject *module, PyObject *args, PyObject *kwargs)
+os_lchown(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"path", "uid", "gid", NULL};
@@ -776,7 +776,7 @@ os_lchown(PyObject *module, PyObject *args, PyObject *kwargs)
uid_t uid;
gid_t gid;
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
path_converter, &path, _Py_Uid_Converter, &uid, _Py_Gid_Converter, &gid)) {
goto exit;
}
@@ -847,14 +847,14 @@ PyDoc_STRVAR(os_link__doc__,
" NotImplementedError.");
#define OS_LINK_METHODDEF \
- {"link", (PyCFunction)os_link, METH_VARARGS|METH_KEYWORDS, os_link__doc__},
+ {"link", (PyCFunction)os_link, METH_FASTCALL, os_link__doc__},
static PyObject *
os_link_impl(PyObject *module, path_t *src, path_t *dst, int src_dir_fd,
int dst_dir_fd, int follow_symlinks);
static PyObject *
-os_link(PyObject *module, PyObject *args, PyObject *kwargs)
+os_link(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"src", "dst", "src_dir_fd", "dst_dir_fd", "follow_symlinks", NULL};
@@ -865,7 +865,7 @@ os_link(PyObject *module, PyObject *args, PyObject *kwargs)
int dst_dir_fd = DEFAULT_DIR_FD;
int follow_symlinks = 1;
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
path_converter, &src, path_converter, &dst, dir_fd_converter, &src_dir_fd, dir_fd_converter, &dst_dir_fd, &follow_symlinks)) {
goto exit;
}
@@ -900,20 +900,20 @@ PyDoc_STRVAR(os_listdir__doc__,
"entries \'.\' and \'..\' even if they are present in the directory.");
#define OS_LISTDIR_METHODDEF \
- {"listdir", (PyCFunction)os_listdir, METH_VARARGS|METH_KEYWORDS, os_listdir__doc__},
+ {"listdir", (PyCFunction)os_listdir, METH_FASTCALL, os_listdir__doc__},
static PyObject *
os_listdir_impl(PyObject *module, path_t *path);
static PyObject *
-os_listdir(PyObject *module, PyObject *args, PyObject *kwargs)
+os_listdir(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"path", NULL};
static _PyArg_Parser _parser = {"|O&:listdir", _keywords, 0};
path_t path = PATH_T_INITIALIZE("listdir", "path", 1, PATH_HAVE_FDOPENDIR);
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
path_converter, &path)) {
goto exit;
}
@@ -1032,20 +1032,20 @@ PyDoc_STRVAR(os__getvolumepathname__doc__,
"A helper function for ismount on Win32.");
#define OS__GETVOLUMEPATHNAME_METHODDEF \
- {"_getvolumepathname", (PyCFunction)os__getvolumepathname, METH_VARARGS|METH_KEYWORDS, os__getvolumepathname__doc__},
+ {"_getvolumepathname", (PyCFunction)os__getvolumepathname, METH_FASTCALL, os__getvolumepathname__doc__},
static PyObject *
os__getvolumepathname_impl(PyObject *module, PyObject *path);
static PyObject *
-os__getvolumepathname(PyObject *module, PyObject *args, PyObject *kwargs)
+os__getvolumepathname(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"path", NULL};
static _PyArg_Parser _parser = {"U:_getvolumepathname", _keywords, 0};
PyObject *path;
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
&path)) {
goto exit;
}
@@ -1071,13 +1071,13 @@ PyDoc_STRVAR(os_mkdir__doc__,
"The mode argument is ignored on Windows.");
#define OS_MKDIR_METHODDEF \
- {"mkdir", (PyCFunction)os_mkdir, METH_VARARGS|METH_KEYWORDS, os_mkdir__doc__},
+ {"mkdir", (PyCFunction)os_mkdir, METH_FASTCALL, os_mkdir__doc__},
static PyObject *
os_mkdir_impl(PyObject *module, path_t *path, int mode, int dir_fd);
static PyObject *
-os_mkdir(PyObject *module, PyObject *args, PyObject *kwargs)
+os_mkdir(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"path", "mode", "dir_fd", NULL};
@@ -1086,7 +1086,7 @@ os_mkdir(PyObject *module, PyObject *args, PyObject *kwargs)
int mode = 511;
int dir_fd = DEFAULT_DIR_FD;
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
path_converter, &path, &mode, MKDIRAT_DIR_FD_CONVERTER, &dir_fd)) {
goto exit;
}
@@ -1139,13 +1139,13 @@ PyDoc_STRVAR(os_getpriority__doc__,
"Return program scheduling priority.");
#define OS_GETPRIORITY_METHODDEF \
- {"getpriority", (PyCFunction)os_getpriority, METH_VARARGS|METH_KEYWORDS, os_getpriority__doc__},
+ {"getpriority", (PyCFunction)os_getpriority, METH_FASTCALL, os_getpriority__doc__},
static PyObject *
os_getpriority_impl(PyObject *module, int which, int who);
static PyObject *
-os_getpriority(PyObject *module, PyObject *args, PyObject *kwargs)
+os_getpriority(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"which", "who", NULL};
@@ -1153,7 +1153,7 @@ os_getpriority(PyObject *module, PyObject *args, PyObject *kwargs)
int which;
int who;
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
&which, &who)) {
goto exit;
}
@@ -1174,13 +1174,13 @@ PyDoc_STRVAR(os_setpriority__doc__,
"Set program scheduling priority.");
#define OS_SETPRIORITY_METHODDEF \
- {"setpriority", (PyCFunction)os_setpriority, METH_VARARGS|METH_KEYWORDS, os_setpriority__doc__},
+ {"setpriority", (PyCFunction)os_setpriority, METH_FASTCALL, os_setpriority__doc__},
static PyObject *
os_setpriority_impl(PyObject *module, int which, int who, int priority);
static PyObject *
-os_setpriority(PyObject *module, PyObject *args, PyObject *kwargs)
+os_setpriority(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"which", "who", "priority", NULL};
@@ -1189,7 +1189,7 @@ os_setpriority(PyObject *module, PyObject *args, PyObject *kwargs)
int who;
int priority;
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
&which, &who, &priority)) {
goto exit;
}
@@ -1214,14 +1214,14 @@ PyDoc_STRVAR(os_rename__doc__,
" If they are unavailable, using them will raise a NotImplementedError.");
#define OS_RENAME_METHODDEF \
- {"rename", (PyCFunction)os_rename, METH_VARARGS|METH_KEYWORDS, os_rename__doc__},
+ {"rename", (PyCFunction)os_rename, METH_FASTCALL, os_rename__doc__},
static PyObject *
os_rename_impl(PyObject *module, path_t *src, path_t *dst, int src_dir_fd,
int dst_dir_fd);
static PyObject *
-os_rename(PyObject *module, PyObject *args, PyObject *kwargs)
+os_rename(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"src", "dst", "src_dir_fd", "dst_dir_fd", NULL};
@@ -1231,7 +1231,7 @@ os_rename(PyObject *module, PyObject *args, PyObject *kwargs)
int src_dir_fd = DEFAULT_DIR_FD;
int dst_dir_fd = DEFAULT_DIR_FD;
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
path_converter, &src, path_converter, &dst, dir_fd_converter, &src_dir_fd, dir_fd_converter, &dst_dir_fd)) {
goto exit;
}
@@ -1259,14 +1259,14 @@ PyDoc_STRVAR(os_replace__doc__,
" If they are unavailable, using them will raise a NotImplementedError.\"");
#define OS_REPLACE_METHODDEF \
- {"replace", (PyCFunction)os_replace, METH_VARARGS|METH_KEYWORDS, os_replace__doc__},
+ {"replace", (PyCFunction)os_replace, METH_FASTCALL, os_replace__doc__},
static PyObject *
os_replace_impl(PyObject *module, path_t *src, path_t *dst, int src_dir_fd,
int dst_dir_fd);
static PyObject *
-os_replace(PyObject *module, PyObject *args, PyObject *kwargs)
+os_replace(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"src", "dst", "src_dir_fd", "dst_dir_fd", NULL};
@@ -1276,7 +1276,7 @@ os_replace(PyObject *module, PyObject *args, PyObject *kwargs)
int src_dir_fd = DEFAULT_DIR_FD;
int dst_dir_fd = DEFAULT_DIR_FD;
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
path_converter, &src, path_converter, &dst, dir_fd_converter, &src_dir_fd, dir_fd_converter, &dst_dir_fd)) {
goto exit;
}
@@ -1303,13 +1303,13 @@ PyDoc_STRVAR(os_rmdir__doc__,
" If it is unavailable, using it will raise a NotImplementedError.");
#define OS_RMDIR_METHODDEF \
- {"rmdir", (PyCFunction)os_rmdir, METH_VARARGS|METH_KEYWORDS, os_rmdir__doc__},
+ {"rmdir", (PyCFunction)os_rmdir, METH_FASTCALL, os_rmdir__doc__},
static PyObject *
os_rmdir_impl(PyObject *module, path_t *path, int dir_fd);
static PyObject *
-os_rmdir(PyObject *module, PyObject *args, PyObject *kwargs)
+os_rmdir(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"path", "dir_fd", NULL};
@@ -1317,7 +1317,7 @@ os_rmdir(PyObject *module, PyObject *args, PyObject *kwargs)
path_t path = PATH_T_INITIALIZE("rmdir", "path", 0, 0);
int dir_fd = DEFAULT_DIR_FD;
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
path_converter, &path, UNLINKAT_DIR_FD_CONVERTER, &dir_fd)) {
goto exit;
}
@@ -1339,13 +1339,13 @@ PyDoc_STRVAR(os_system__doc__,
"Execute the command in a subshell.");
#define OS_SYSTEM_METHODDEF \
- {"system", (PyCFunction)os_system, METH_VARARGS|METH_KEYWORDS, os_system__doc__},
+ {"system", (PyCFunction)os_system, METH_FASTCALL, os_system__doc__},
static long
os_system_impl(PyObject *module, Py_UNICODE *command);
static PyObject *
-os_system(PyObject *module, PyObject *args, PyObject *kwargs)
+os_system(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"command", NULL};
@@ -1353,7 +1353,7 @@ os_system(PyObject *module, PyObject *args, PyObject *kwargs)
Py_UNICODE *command;
long _return_value;
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
&command)) {
goto exit;
}
@@ -1378,13 +1378,13 @@ PyDoc_STRVAR(os_system__doc__,
"Execute the command in a subshell.");
#define OS_SYSTEM_METHODDEF \
- {"system", (PyCFunction)os_system, METH_VARARGS|METH_KEYWORDS, os_system__doc__},
+ {"system", (PyCFunction)os_system, METH_FASTCALL, os_system__doc__},
static long
os_system_impl(PyObject *module, PyObject *command);
static PyObject *
-os_system(PyObject *module, PyObject *args, PyObject *kwargs)
+os_system(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"command", NULL};
@@ -1392,7 +1392,7 @@ os_system(PyObject *module, PyObject *args, PyObject *kwargs)
PyObject *command = NULL;
long _return_value;
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
PyUnicode_FSConverter, &command)) {
goto exit;
}
@@ -1450,13 +1450,13 @@ PyDoc_STRVAR(os_unlink__doc__,
" If it is unavailable, using it will raise a NotImplementedError.");
#define OS_UNLINK_METHODDEF \
- {"unlink", (PyCFunction)os_unlink, METH_VARARGS|METH_KEYWORDS, os_unlink__doc__},
+ {"unlink", (PyCFunction)os_unlink, METH_FASTCALL, os_unlink__doc__},
static PyObject *
os_unlink_impl(PyObject *module, path_t *path, int dir_fd);
static PyObject *
-os_unlink(PyObject *module, PyObject *args, PyObject *kwargs)
+os_unlink(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"path", "dir_fd", NULL};
@@ -1464,7 +1464,7 @@ os_unlink(PyObject *module, PyObject *args, PyObject *kwargs)
path_t path = PATH_T_INITIALIZE("unlink", "path", 0, 0);
int dir_fd = DEFAULT_DIR_FD;
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
path_converter, &path, UNLINKAT_DIR_FD_CONVERTER, &dir_fd)) {
goto exit;
}
@@ -1489,13 +1489,13 @@ PyDoc_STRVAR(os_remove__doc__,
" If it is unavailable, using it will raise a NotImplementedError.");
#define OS_REMOVE_METHODDEF \
- {"remove", (PyCFunction)os_remove, METH_VARARGS|METH_KEYWORDS, os_remove__doc__},
+ {"remove", (PyCFunction)os_remove, METH_FASTCALL, os_remove__doc__},
static PyObject *
os_remove_impl(PyObject *module, path_t *path, int dir_fd);
static PyObject *
-os_remove(PyObject *module, PyObject *args, PyObject *kwargs)
+os_remove(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"path", "dir_fd", NULL};
@@ -1503,7 +1503,7 @@ os_remove(PyObject *module, PyObject *args, PyObject *kwargs)
path_t path = PATH_T_INITIALIZE("remove", "path", 0, 0);
int dir_fd = DEFAULT_DIR_FD;
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
path_converter, &path, UNLINKAT_DIR_FD_CONVERTER, &dir_fd)) {
goto exit;
}
@@ -1571,14 +1571,14 @@ PyDoc_STRVAR(os_utime__doc__,
" If they are unavailable, using them will raise a NotImplementedError.");
#define OS_UTIME_METHODDEF \
- {"utime", (PyCFunction)os_utime, METH_VARARGS|METH_KEYWORDS, os_utime__doc__},
+ {"utime", (PyCFunction)os_utime, METH_FASTCALL, os_utime__doc__},
static PyObject *
os_utime_impl(PyObject *module, path_t *path, PyObject *times, PyObject *ns,
int dir_fd, int follow_symlinks);
static PyObject *
-os_utime(PyObject *module, PyObject *args, PyObject *kwargs)
+os_utime(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"path", "times", "ns", "dir_fd", "follow_symlinks", NULL};
@@ -1589,7 +1589,7 @@ os_utime(PyObject *module, PyObject *args, PyObject *kwargs)
int dir_fd = DEFAULT_DIR_FD;
int follow_symlinks = 1;
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
path_converter, &path, &times, &ns, FUTIMENSAT_DIR_FD_CONVERTER, &dir_fd, &follow_symlinks)) {
goto exit;
}
@@ -1609,20 +1609,20 @@ PyDoc_STRVAR(os__exit__doc__,
"Exit to the system with specified status, without normal exit processing.");
#define OS__EXIT_METHODDEF \
- {"_exit", (PyCFunction)os__exit, METH_VARARGS|METH_KEYWORDS, os__exit__doc__},
+ {"_exit", (PyCFunction)os__exit, METH_FASTCALL, os__exit__doc__},
static PyObject *
os__exit_impl(PyObject *module, int status);
static PyObject *
-os__exit(PyObject *module, PyObject *args, PyObject *kwargs)
+os__exit(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"status", NULL};
static _PyArg_Parser _parser = {"i:_exit", _keywords, 0};
int status;
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
&status)) {
goto exit;
}
@@ -1689,13 +1689,13 @@ PyDoc_STRVAR(os_execve__doc__,
" Dictionary of strings mapping to strings.");
#define OS_EXECVE_METHODDEF \
- {"execve", (PyCFunction)os_execve, METH_VARARGS|METH_KEYWORDS, os_execve__doc__},
+ {"execve", (PyCFunction)os_execve, METH_FASTCALL, os_execve__doc__},
static PyObject *
os_execve_impl(PyObject *module, path_t *path, PyObject *argv, PyObject *env);
static PyObject *
-os_execve(PyObject *module, PyObject *args, PyObject *kwargs)
+os_execve(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"path", "argv", "env", NULL};
@@ -1704,7 +1704,7 @@ os_execve(PyObject *module, PyObject *args, PyObject *kwargs)
PyObject *argv;
PyObject *env;
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
path_converter, &path, &argv, &env)) {
goto exit;
}
@@ -1868,20 +1868,20 @@ PyDoc_STRVAR(os_sched_get_priority_max__doc__,
"Get the maximum scheduling priority for policy.");
#define OS_SCHED_GET_PRIORITY_MAX_METHODDEF \
- {"sched_get_priority_max", (PyCFunction)os_sched_get_priority_max, METH_VARARGS|METH_KEYWORDS, os_sched_get_priority_max__doc__},
+ {"sched_get_priority_max", (PyCFunction)os_sched_get_priority_max, METH_FASTCALL, os_sched_get_priority_max__doc__},
static PyObject *
os_sched_get_priority_max_impl(PyObject *module, int policy);
static PyObject *
-os_sched_get_priority_max(PyObject *module, PyObject *args, PyObject *kwargs)
+os_sched_get_priority_max(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"policy", NULL};
static _PyArg_Parser _parser = {"i:sched_get_priority_max", _keywords, 0};
int policy;
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
&policy)) {
goto exit;
}
@@ -1902,20 +1902,20 @@ PyDoc_STRVAR(os_sched_get_priority_min__doc__,
"Get the minimum scheduling priority for policy.");
#define OS_SCHED_GET_PRIORITY_MIN_METHODDEF \
- {"sched_get_priority_min", (PyCFunction)os_sched_get_priority_min, METH_VARARGS|METH_KEYWORDS, os_sched_get_priority_min__doc__},
+ {"sched_get_priority_min", (PyCFunction)os_sched_get_priority_min, METH_FASTCALL, os_sched_get_priority_min__doc__},
static PyObject *
os_sched_get_priority_min_impl(PyObject *module, int policy);
static PyObject *
-os_sched_get_priority_min(PyObject *module, PyObject *args, PyObject *kwargs)
+os_sched_get_priority_min(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"policy", NULL};
static _PyArg_Parser _parser = {"i:sched_get_priority_min", _keywords, 0};
int policy;
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
&policy)) {
goto exit;
}
@@ -2398,20 +2398,20 @@ PyDoc_STRVAR(os_getpgid__doc__,
"Call the system call getpgid(), and return the result.");
#define OS_GETPGID_METHODDEF \
- {"getpgid", (PyCFunction)os_getpgid, METH_VARARGS|METH_KEYWORDS, os_getpgid__doc__},
+ {"getpgid", (PyCFunction)os_getpgid, METH_FASTCALL, os_getpgid__doc__},
static PyObject *
os_getpgid_impl(PyObject *module, pid_t pid);
static PyObject *
-os_getpgid(PyObject *module, PyObject *args, PyObject *kwargs)
+os_getpgid(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"pid", NULL};
static _PyArg_Parser _parser = {"" _Py_PARSE_PID ":getpgid", _keywords, 0};
pid_t pid;
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
&pid)) {
goto exit;
}
@@ -2848,20 +2848,20 @@ PyDoc_STRVAR(os_wait3__doc__,
" (pid, status, rusage)");
#define OS_WAIT3_METHODDEF \
- {"wait3", (PyCFunction)os_wait3, METH_VARARGS|METH_KEYWORDS, os_wait3__doc__},
+ {"wait3", (PyCFunction)os_wait3, METH_FASTCALL, os_wait3__doc__},
static PyObject *
os_wait3_impl(PyObject *module, int options);
static PyObject *
-os_wait3(PyObject *module, PyObject *args, PyObject *kwargs)
+os_wait3(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"options", NULL};
static _PyArg_Parser _parser = {"i:wait3", _keywords, 0};
int options;
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
&options)) {
goto exit;
}
@@ -2885,13 +2885,13 @@ PyDoc_STRVAR(os_wait4__doc__,
" (pid, status, rusage)");
#define OS_WAIT4_METHODDEF \
- {"wait4", (PyCFunction)os_wait4, METH_VARARGS|METH_KEYWORDS, os_wait4__doc__},
+ {"wait4", (PyCFunction)os_wait4, METH_FASTCALL, os_wait4__doc__},
static PyObject *
os_wait4_impl(PyObject *module, pid_t pid, int options);
static PyObject *
-os_wait4(PyObject *module, PyObject *args, PyObject *kwargs)
+os_wait4(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"pid", "options", NULL};
@@ -2899,7 +2899,7 @@ os_wait4(PyObject *module, PyObject *args, PyObject *kwargs)
pid_t pid;
int options;
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
&pid, &options)) {
goto exit;
}
@@ -3076,14 +3076,14 @@ PyDoc_STRVAR(os_symlink__doc__,
" If it is unavailable, using it will raise a NotImplementedError.");
#define OS_SYMLINK_METHODDEF \
- {"symlink", (PyCFunction)os_symlink, METH_VARARGS|METH_KEYWORDS, os_symlink__doc__},
+ {"symlink", (PyCFunction)os_symlink, METH_FASTCALL, os_symlink__doc__},
static PyObject *
os_symlink_impl(PyObject *module, path_t *src, path_t *dst,
int target_is_directory, int dir_fd);
static PyObject *
-os_symlink(PyObject *module, PyObject *args, PyObject *kwargs)
+os_symlink(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"src", "dst", "target_is_directory", "dir_fd", NULL};
@@ -3093,7 +3093,7 @@ os_symlink(PyObject *module, PyObject *args, PyObject *kwargs)
int target_is_directory = 0;
int dir_fd = DEFAULT_DIR_FD;
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
path_converter, &src, path_converter, &dst, &target_is_directory, SYMLINKAT_DIR_FD_CONVERTER, &dir_fd)) {
goto exit;
}
@@ -3298,13 +3298,13 @@ PyDoc_STRVAR(os_open__doc__,
" If it is unavailable, using it will raise a NotImplementedError.");
#define OS_OPEN_METHODDEF \
- {"open", (PyCFunction)os_open, METH_VARARGS|METH_KEYWORDS, os_open__doc__},
+ {"open", (PyCFunction)os_open, METH_FASTCALL, os_open__doc__},
static int
os_open_impl(PyObject *module, path_t *path, int flags, int mode, int dir_fd);
static PyObject *
-os_open(PyObject *module, PyObject *args, PyObject *kwargs)
+os_open(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"path", "flags", "mode", "dir_fd", NULL};
@@ -3315,7 +3315,7 @@ os_open(PyObject *module, PyObject *args, PyObject *kwargs)
int dir_fd = DEFAULT_DIR_FD;
int _return_value;
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
path_converter, &path, &flags, &mode, OPENAT_DIR_FD_CONVERTER, &dir_fd)) {
goto exit;
}
@@ -3339,20 +3339,20 @@ PyDoc_STRVAR(os_close__doc__,
"Close a file descriptor.");
#define OS_CLOSE_METHODDEF \
- {"close", (PyCFunction)os_close, METH_VARARGS|METH_KEYWORDS, os_close__doc__},
+ {"close", (PyCFunction)os_close, METH_FASTCALL, os_close__doc__},
static PyObject *
os_close_impl(PyObject *module, int fd);
static PyObject *
-os_close(PyObject *module, PyObject *args, PyObject *kwargs)
+os_close(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"fd", NULL};
static _PyArg_Parser _parser = {"i:close", _keywords, 0};
int fd;
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
&fd)) {
goto exit;
}
@@ -3430,13 +3430,13 @@ PyDoc_STRVAR(os_dup2__doc__,
"Duplicate file descriptor.");
#define OS_DUP2_METHODDEF \
- {"dup2", (PyCFunction)os_dup2, METH_VARARGS|METH_KEYWORDS, os_dup2__doc__},
+ {"dup2", (PyCFunction)os_dup2, METH_FASTCALL, os_dup2__doc__},
static PyObject *
os_dup2_impl(PyObject *module, int fd, int fd2, int inheritable);
static PyObject *
-os_dup2(PyObject *module, PyObject *args, PyObject *kwargs)
+os_dup2(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"fd", "fd2", "inheritable", NULL};
@@ -3445,7 +3445,7 @@ os_dup2(PyObject *module, PyObject *args, PyObject *kwargs)
int fd2;
int inheritable = 1;
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
&fd, &fd2, &inheritable)) {
goto exit;
}
@@ -3695,20 +3695,20 @@ PyDoc_STRVAR(os_fstat__doc__,
"Equivalent to os.stat(fd).");
#define OS_FSTAT_METHODDEF \
- {"fstat", (PyCFunction)os_fstat, METH_VARARGS|METH_KEYWORDS, os_fstat__doc__},
+ {"fstat", (PyCFunction)os_fstat, METH_FASTCALL, os_fstat__doc__},
static PyObject *
os_fstat_impl(PyObject *module, int fd);
static PyObject *
-os_fstat(PyObject *module, PyObject *args, PyObject *kwargs)
+os_fstat(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"fd", NULL};
static _PyArg_Parser _parser = {"i:fstat", _keywords, 0};
int fd;
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
&fd)) {
goto exit;
}
@@ -3918,13 +3918,13 @@ PyDoc_STRVAR(os_mkfifo__doc__,
" If it is unavailable, using it will raise a NotImplementedError.");
#define OS_MKFIFO_METHODDEF \
- {"mkfifo", (PyCFunction)os_mkfifo, METH_VARARGS|METH_KEYWORDS, os_mkfifo__doc__},
+ {"mkfifo", (PyCFunction)os_mkfifo, METH_FASTCALL, os_mkfifo__doc__},
static PyObject *
os_mkfifo_impl(PyObject *module, path_t *path, int mode, int dir_fd);
static PyObject *
-os_mkfifo(PyObject *module, PyObject *args, PyObject *kwargs)
+os_mkfifo(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"path", "mode", "dir_fd", NULL};
@@ -3933,7 +3933,7 @@ os_mkfifo(PyObject *module, PyObject *args, PyObject *kwargs)
int mode = 438;
int dir_fd = DEFAULT_DIR_FD;
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
path_converter, &path, &mode, MKFIFOAT_DIR_FD_CONVERTER, &dir_fd)) {
goto exit;
}
@@ -3969,14 +3969,14 @@ PyDoc_STRVAR(os_mknod__doc__,
" If it is unavailable, using it will raise a NotImplementedError.");
#define OS_MKNOD_METHODDEF \
- {"mknod", (PyCFunction)os_mknod, METH_VARARGS|METH_KEYWORDS, os_mknod__doc__},
+ {"mknod", (PyCFunction)os_mknod, METH_FASTCALL, os_mknod__doc__},
static PyObject *
os_mknod_impl(PyObject *module, path_t *path, int mode, dev_t device,
int dir_fd);
static PyObject *
-os_mknod(PyObject *module, PyObject *args, PyObject *kwargs)
+os_mknod(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"path", "mode", "device", "dir_fd", NULL};
@@ -3986,7 +3986,7 @@ os_mknod(PyObject *module, PyObject *args, PyObject *kwargs)
dev_t device = 0;
int dir_fd = DEFAULT_DIR_FD;
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
path_converter, &path, &mode, _Py_Dev_Converter, &device, MKNODAT_DIR_FD_CONVERTER, &dir_fd)) {
goto exit;
}
@@ -4156,13 +4156,13 @@ PyDoc_STRVAR(os_truncate__doc__,
" If this functionality is unavailable, using it raises an exception.");
#define OS_TRUNCATE_METHODDEF \
- {"truncate", (PyCFunction)os_truncate, METH_VARARGS|METH_KEYWORDS, os_truncate__doc__},
+ {"truncate", (PyCFunction)os_truncate, METH_FASTCALL, os_truncate__doc__},
static PyObject *
os_truncate_impl(PyObject *module, path_t *path, Py_off_t length);
static PyObject *
-os_truncate(PyObject *module, PyObject *args, PyObject *kwargs)
+os_truncate(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"path", "length", NULL};
@@ -4170,7 +4170,7 @@ os_truncate(PyObject *module, PyObject *args, PyObject *kwargs)
path_t path = PATH_T_INITIALIZE("truncate", "path", 0, PATH_HAVE_FTRUNCATE);
Py_off_t length;
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
path_converter, &path, Py_off_t_converter, &length)) {
goto exit;
}
@@ -4447,13 +4447,13 @@ PyDoc_STRVAR(os_WIFCONTINUED__doc__,
"job control stop.");
#define OS_WIFCONTINUED_METHODDEF \
- {"WIFCONTINUED", (PyCFunction)os_WIFCONTINUED, METH_VARARGS|METH_KEYWORDS, os_WIFCONTINUED__doc__},
+ {"WIFCONTINUED", (PyCFunction)os_WIFCONTINUED, METH_FASTCALL, os_WIFCONTINUED__doc__},
static int
os_WIFCONTINUED_impl(PyObject *module, int status);
static PyObject *
-os_WIFCONTINUED(PyObject *module, PyObject *args, PyObject *kwargs)
+os_WIFCONTINUED(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"status", NULL};
@@ -4461,7 +4461,7 @@ os_WIFCONTINUED(PyObject *module, PyObject *args, PyObject *kwargs)
int status;
int _return_value;
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
&status)) {
goto exit;
}
@@ -4486,13 +4486,13 @@ PyDoc_STRVAR(os_WIFSTOPPED__doc__,
"Return True if the process returning status was stopped.");
#define OS_WIFSTOPPED_METHODDEF \
- {"WIFSTOPPED", (PyCFunction)os_WIFSTOPPED, METH_VARARGS|METH_KEYWORDS, os_WIFSTOPPED__doc__},
+ {"WIFSTOPPED", (PyCFunction)os_WIFSTOPPED, METH_FASTCALL, os_WIFSTOPPED__doc__},
static int
os_WIFSTOPPED_impl(PyObject *module, int status);
static PyObject *
-os_WIFSTOPPED(PyObject *module, PyObject *args, PyObject *kwargs)
+os_WIFSTOPPED(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"status", NULL};
@@ -4500,7 +4500,7 @@ os_WIFSTOPPED(PyObject *module, PyObject *args, PyObject *kwargs)
int status;
int _return_value;
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
&status)) {
goto exit;
}
@@ -4525,13 +4525,13 @@ PyDoc_STRVAR(os_WIFSIGNALED__doc__,
"Return True if the process returning status was terminated by a signal.");
#define OS_WIFSIGNALED_METHODDEF \
- {"WIFSIGNALED", (PyCFunction)os_WIFSIGNALED, METH_VARARGS|METH_KEYWORDS, os_WIFSIGNALED__doc__},
+ {"WIFSIGNALED", (PyCFunction)os_WIFSIGNALED, METH_FASTCALL, os_WIFSIGNALED__doc__},
static int
os_WIFSIGNALED_impl(PyObject *module, int status);
static PyObject *
-os_WIFSIGNALED(PyObject *module, PyObject *args, PyObject *kwargs)
+os_WIFSIGNALED(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"status", NULL};
@@ -4539,7 +4539,7 @@ os_WIFSIGNALED(PyObject *module, PyObject *args, PyObject *kwargs)
int status;
int _return_value;
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
&status)) {
goto exit;
}
@@ -4564,13 +4564,13 @@ PyDoc_STRVAR(os_WIFEXITED__doc__,
"Return True if the process returning status exited via the exit() system call.");
#define OS_WIFEXITED_METHODDEF \
- {"WIFEXITED", (PyCFunction)os_WIFEXITED, METH_VARARGS|METH_KEYWORDS, os_WIFEXITED__doc__},
+ {"WIFEXITED", (PyCFunction)os_WIFEXITED, METH_FASTCALL, os_WIFEXITED__doc__},
static int
os_WIFEXITED_impl(PyObject *module, int status);
static PyObject *
-os_WIFEXITED(PyObject *module, PyObject *args, PyObject *kwargs)
+os_WIFEXITED(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"status", NULL};
@@ -4578,7 +4578,7 @@ os_WIFEXITED(PyObject *module, PyObject *args, PyObject *kwargs)
int status;
int _return_value;
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
&status)) {
goto exit;
}
@@ -4603,13 +4603,13 @@ PyDoc_STRVAR(os_WEXITSTATUS__doc__,
"Return the process return code from status.");
#define OS_WEXITSTATUS_METHODDEF \
- {"WEXITSTATUS", (PyCFunction)os_WEXITSTATUS, METH_VARARGS|METH_KEYWORDS, os_WEXITSTATUS__doc__},
+ {"WEXITSTATUS", (PyCFunction)os_WEXITSTATUS, METH_FASTCALL, os_WEXITSTATUS__doc__},
static int
os_WEXITSTATUS_impl(PyObject *module, int status);
static PyObject *
-os_WEXITSTATUS(PyObject *module, PyObject *args, PyObject *kwargs)
+os_WEXITSTATUS(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"status", NULL};
@@ -4617,7 +4617,7 @@ os_WEXITSTATUS(PyObject *module, PyObject *args, PyObject *kwargs)
int status;
int _return_value;
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
&status)) {
goto exit;
}
@@ -4642,13 +4642,13 @@ PyDoc_STRVAR(os_WTERMSIG__doc__,
"Return the signal that terminated the process that provided the status value.");
#define OS_WTERMSIG_METHODDEF \
- {"WTERMSIG", (PyCFunction)os_WTERMSIG, METH_VARARGS|METH_KEYWORDS, os_WTERMSIG__doc__},
+ {"WTERMSIG", (PyCFunction)os_WTERMSIG, METH_FASTCALL, os_WTERMSIG__doc__},
static int
os_WTERMSIG_impl(PyObject *module, int status);
static PyObject *
-os_WTERMSIG(PyObject *module, PyObject *args, PyObject *kwargs)
+os_WTERMSIG(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"status", NULL};
@@ -4656,7 +4656,7 @@ os_WTERMSIG(PyObject *module, PyObject *args, PyObject *kwargs)
int status;
int _return_value;
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
&status)) {
goto exit;
}
@@ -4681,13 +4681,13 @@ PyDoc_STRVAR(os_WSTOPSIG__doc__,
"Return the signal that stopped the process that provided the status value.");
#define OS_WSTOPSIG_METHODDEF \
- {"WSTOPSIG", (PyCFunction)os_WSTOPSIG, METH_VARARGS|METH_KEYWORDS, os_WSTOPSIG__doc__},
+ {"WSTOPSIG", (PyCFunction)os_WSTOPSIG, METH_FASTCALL, os_WSTOPSIG__doc__},
static int
os_WSTOPSIG_impl(PyObject *module, int status);
static PyObject *
-os_WSTOPSIG(PyObject *module, PyObject *args, PyObject *kwargs)
+os_WSTOPSIG(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"status", NULL};
@@ -4695,7 +4695,7 @@ os_WSTOPSIG(PyObject *module, PyObject *args, PyObject *kwargs)
int status;
int _return_value;
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
&status)) {
goto exit;
}
@@ -4757,20 +4757,20 @@ PyDoc_STRVAR(os_statvfs__doc__,
" If this functionality is unavailable, using it raises an exception.");
#define OS_STATVFS_METHODDEF \
- {"statvfs", (PyCFunction)os_statvfs, METH_VARARGS|METH_KEYWORDS, os_statvfs__doc__},
+ {"statvfs", (PyCFunction)os_statvfs, METH_FASTCALL, os_statvfs__doc__},
static PyObject *
os_statvfs_impl(PyObject *module, path_t *path);
static PyObject *
-os_statvfs(PyObject *module, PyObject *args, PyObject *kwargs)
+os_statvfs(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"path", NULL};
static _PyArg_Parser _parser = {"O&:statvfs", _keywords, 0};
path_t path = PATH_T_INITIALIZE("statvfs", "path", 0, PATH_HAVE_FSTATVFS);
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
path_converter, &path)) {
goto exit;
}
@@ -4794,20 +4794,20 @@ PyDoc_STRVAR(os__getdiskusage__doc__,
"Return disk usage statistics about the given path as a (total, free) tuple.");
#define OS__GETDISKUSAGE_METHODDEF \
- {"_getdiskusage", (PyCFunction)os__getdiskusage, METH_VARARGS|METH_KEYWORDS, os__getdiskusage__doc__},
+ {"_getdiskusage", (PyCFunction)os__getdiskusage, METH_FASTCALL, os__getdiskusage__doc__},
static PyObject *
os__getdiskusage_impl(PyObject *module, Py_UNICODE *path);
static PyObject *
-os__getdiskusage(PyObject *module, PyObject *args, PyObject *kwargs)
+os__getdiskusage(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"path", NULL};
static _PyArg_Parser _parser = {"u:_getdiskusage", _keywords, 0};
Py_UNICODE *path;
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
&path)) {
goto exit;
}
@@ -4872,13 +4872,13 @@ PyDoc_STRVAR(os_pathconf__doc__,
" If this functionality is unavailable, using it raises an exception.");
#define OS_PATHCONF_METHODDEF \
- {"pathconf", (PyCFunction)os_pathconf, METH_VARARGS|METH_KEYWORDS, os_pathconf__doc__},
+ {"pathconf", (PyCFunction)os_pathconf, METH_FASTCALL, os_pathconf__doc__},
static long
os_pathconf_impl(PyObject *module, path_t *path, int name);
static PyObject *
-os_pathconf(PyObject *module, PyObject *args, PyObject *kwargs)
+os_pathconf(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"path", "name", NULL};
@@ -4887,7 +4887,7 @@ os_pathconf(PyObject *module, PyObject *args, PyObject *kwargs)
int name;
long _return_value;
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
path_converter, &path, conv_path_confname, &name)) {
goto exit;
}
@@ -5020,20 +5020,21 @@ PyDoc_STRVAR(os_startfile__doc__,
"the underlying Win32 ShellExecute function doesn\'t work if it is.");
#define OS_STARTFILE_METHODDEF \
- {"startfile", (PyCFunction)os_startfile, METH_VARARGS|METH_KEYWORDS, os_startfile__doc__},
+ {"startfile", (PyCFunction)os_startfile, METH_FASTCALL, os_startfile__doc__},
static PyObject *
os_startfile_impl(PyObject *module, path_t *filepath, Py_UNICODE *operation);
static PyObject *
-os_startfile(PyObject *module, PyObject *args, PyObject *kwargs)
+os_startfile(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
- static char *_keywords[] = {"filepath", "operation", NULL};
+ static const char * const _keywords[] = {"filepath", "operation", NULL};
+ static _PyArg_Parser _parser = {"O&|u:startfile", _keywords, 0};
path_t filepath = PATH_T_INITIALIZE("startfile", "filepath", 0, 0);
Py_UNICODE *operation = NULL;
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&|u:startfile", _keywords,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
path_converter, &filepath, &operation)) {
goto exit;
}
@@ -5084,20 +5085,20 @@ PyDoc_STRVAR(os_device_encoding__doc__,
"If the device is not a terminal, return None.");
#define OS_DEVICE_ENCODING_METHODDEF \
- {"device_encoding", (PyCFunction)os_device_encoding, METH_VARARGS|METH_KEYWORDS, os_device_encoding__doc__},
+ {"device_encoding", (PyCFunction)os_device_encoding, METH_FASTCALL, os_device_encoding__doc__},
static PyObject *
os_device_encoding_impl(PyObject *module, int fd);
static PyObject *
-os_device_encoding(PyObject *module, PyObject *args, PyObject *kwargs)
+os_device_encoding(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"fd", NULL};
static _PyArg_Parser _parser = {"i:device_encoding", _keywords, 0};
int fd;
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
&fd)) {
goto exit;
}
@@ -5233,14 +5234,14 @@ PyDoc_STRVAR(os_getxattr__doc__,
" the link points to.");
#define OS_GETXATTR_METHODDEF \
- {"getxattr", (PyCFunction)os_getxattr, METH_VARARGS|METH_KEYWORDS, os_getxattr__doc__},
+ {"getxattr", (PyCFunction)os_getxattr, METH_FASTCALL, os_getxattr__doc__},
static PyObject *
os_getxattr_impl(PyObject *module, path_t *path, path_t *attribute,
int follow_symlinks);
static PyObject *
-os_getxattr(PyObject *module, PyObject *args, PyObject *kwargs)
+os_getxattr(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"path", "attribute", "follow_symlinks", NULL};
@@ -5249,7 +5250,7 @@ os_getxattr(PyObject *module, PyObject *args, PyObject *kwargs)
path_t attribute = PATH_T_INITIALIZE("getxattr", "attribute", 0, 0);
int follow_symlinks = 1;
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
path_converter, &path, path_converter, &attribute, &follow_symlinks)) {
goto exit;
}
@@ -5281,14 +5282,14 @@ PyDoc_STRVAR(os_setxattr__doc__,
" the link points to.");
#define OS_SETXATTR_METHODDEF \
- {"setxattr", (PyCFunction)os_setxattr, METH_VARARGS|METH_KEYWORDS, os_setxattr__doc__},
+ {"setxattr", (PyCFunction)os_setxattr, METH_FASTCALL, os_setxattr__doc__},
static PyObject *
os_setxattr_impl(PyObject *module, path_t *path, path_t *attribute,
Py_buffer *value, int flags, int follow_symlinks);
static PyObject *
-os_setxattr(PyObject *module, PyObject *args, PyObject *kwargs)
+os_setxattr(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"path", "attribute", "value", "flags", "follow_symlinks", NULL};
@@ -5299,7 +5300,7 @@ os_setxattr(PyObject *module, PyObject *args, PyObject *kwargs)
int flags = 0;
int follow_symlinks = 1;
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
path_converter, &path, path_converter, &attribute, &value, &flags, &follow_symlinks)) {
goto exit;
}
@@ -5334,14 +5335,14 @@ PyDoc_STRVAR(os_removexattr__doc__,
" the link points to.");
#define OS_REMOVEXATTR_METHODDEF \
- {"removexattr", (PyCFunction)os_removexattr, METH_VARARGS|METH_KEYWORDS, os_removexattr__doc__},
+ {"removexattr", (PyCFunction)os_removexattr, METH_FASTCALL, os_removexattr__doc__},
static PyObject *
os_removexattr_impl(PyObject *module, path_t *path, path_t *attribute,
int follow_symlinks);
static PyObject *
-os_removexattr(PyObject *module, PyObject *args, PyObject *kwargs)
+os_removexattr(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"path", "attribute", "follow_symlinks", NULL};
@@ -5350,7 +5351,7 @@ os_removexattr(PyObject *module, PyObject *args, PyObject *kwargs)
path_t attribute = PATH_T_INITIALIZE("removexattr", "attribute", 0, 0);
int follow_symlinks = 1;
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
path_converter, &path, path_converter, &attribute, &follow_symlinks)) {
goto exit;
}
@@ -5382,13 +5383,13 @@ PyDoc_STRVAR(os_listxattr__doc__,
" the link points to.");
#define OS_LISTXATTR_METHODDEF \
- {"listxattr", (PyCFunction)os_listxattr, METH_VARARGS|METH_KEYWORDS, os_listxattr__doc__},
+ {"listxattr", (PyCFunction)os_listxattr, METH_FASTCALL, os_listxattr__doc__},
static PyObject *
os_listxattr_impl(PyObject *module, path_t *path, int follow_symlinks);
static PyObject *
-os_listxattr(PyObject *module, PyObject *args, PyObject *kwargs)
+os_listxattr(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"path", "follow_symlinks", NULL};
@@ -5396,7 +5397,7 @@ os_listxattr(PyObject *module, PyObject *args, PyObject *kwargs)
path_t path = PATH_T_INITIALIZE("listxattr", "path", 1, 1);
int follow_symlinks = 1;
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
path_converter, &path, &follow_symlinks)) {
goto exit;
}
@@ -5602,20 +5603,20 @@ PyDoc_STRVAR(os_fspath__doc__,
"types raise a TypeError.");
#define OS_FSPATH_METHODDEF \
- {"fspath", (PyCFunction)os_fspath, METH_VARARGS|METH_KEYWORDS, os_fspath__doc__},
+ {"fspath", (PyCFunction)os_fspath, METH_FASTCALL, os_fspath__doc__},
static PyObject *
os_fspath_impl(PyObject *module, PyObject *path);
static PyObject *
-os_fspath(PyObject *module, PyObject *args, PyObject *kwargs)
+os_fspath(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"path", NULL};
static _PyArg_Parser _parser = {"O:fspath", _keywords, 0};
PyObject *path;
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
&path)) {
goto exit;
}
@@ -5634,13 +5635,13 @@ PyDoc_STRVAR(os_getrandom__doc__,
"Obtain a series of random bytes.");
#define OS_GETRANDOM_METHODDEF \
- {"getrandom", (PyCFunction)os_getrandom, METH_VARARGS|METH_KEYWORDS, os_getrandom__doc__},
+ {"getrandom", (PyCFunction)os_getrandom, METH_FASTCALL, os_getrandom__doc__},
static PyObject *
os_getrandom_impl(PyObject *module, Py_ssize_t size, int flags);
static PyObject *
-os_getrandom(PyObject *module, PyObject *args, PyObject *kwargs)
+os_getrandom(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"size", "flags", NULL};
@@ -5648,7 +5649,7 @@ os_getrandom(PyObject *module, PyObject *args, PyObject *kwargs)
Py_ssize_t size;
int flags = 0;
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
&size, &flags)) {
goto exit;
}
@@ -6139,4 +6140,4 @@ exit:
#ifndef OS_GETRANDOM_METHODDEF
#define OS_GETRANDOM_METHODDEF
#endif /* !defined(OS_GETRANDOM_METHODDEF) */
-/*[clinic end generated code: output=fce51c7d432662c2 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=dfa6bc9d1f2db750 input=a9049054013a1b77]*/