summaryrefslogtreecommitdiffstats
path: root/Modules/posixmodule.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2020-10-09 20:00:45 (GMT)
committerGitHub <noreply@github.com>2020-10-09 20:00:45 (GMT)
commit9975cc5008c795e069ce11e2dbed2110cc12e74e (patch)
tree87aca48f943cd04f0a3defe5f2666438efa959fa /Modules/posixmodule.c
parentb2c0a43699bd9023a69e3fa554f5488a2e17e278 (diff)
downloadcpython-9975cc5008c795e069ce11e2dbed2110cc12e74e.zip
cpython-9975cc5008c795e069ce11e2dbed2110cc12e74e.tar.gz
cpython-9975cc5008c795e069ce11e2dbed2110cc12e74e.tar.bz2
bpo-41985: Add _PyLong_FileDescriptor_Converter and AC converter for "fildes". (GH-22620)
Diffstat (limited to 'Modules/posixmodule.c')
-rw-r--r--Modules/posixmodule.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 7c49693..165625c 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -1634,18 +1634,6 @@ path_error2(path_t *path, path_t *path2)
/* POSIX generic methods */
-static int
-fildes_converter(PyObject *o, void *p)
-{
- int fd;
- int *pointer = (int *)p;
- fd = PyObject_AsFileDescriptor(o);
- if (fd < 0)
- return 0;
- *pointer = fd;
- return 1;
-}
-
static PyObject *
posix_fildes_fd(int fd, int (*func)(int))
{
@@ -2642,10 +2630,6 @@ class dir_fd_converter(CConverter):
else:
self.converter = 'dir_fd_converter'
-class fildes_converter(CConverter):
- type = 'int'
- converter = 'fildes_converter'
-
class uid_t_converter(CConverter):
type = "uid_t"
converter = '_Py_Uid_Converter'
@@ -2708,7 +2692,7 @@ class sysconf_confname_converter(path_confname_converter):
converter="conv_sysconf_confname"
[python start generated code]*/
-/*[python end generated code: output=da39a3ee5e6b4b0d input=f1c8ae8d744f6c8b]*/
+/*[python end generated code: output=da39a3ee5e6b4b0d input=3338733161aa7879]*/
/*[clinic input]