PyAPI_FUNC(PyObject *) PyFile_OpenCode(const char *utf8path);
PyAPI_FUNC(PyObject *) PyFile_OpenCodeObject(PyObject *path);
PyAPI_FUNC(int) PyFile_SetOpenCodeHook(Py_OpenCodeHookFunction hook, void *userData);
-
-PyAPI_FUNC(int) _PyLong_FileDescriptor_Converter(PyObject *, void *);
# error "this header file must not be included directly"
#endif
-PyAPI_FUNC(int) _PyLong_Size_t_Converter(PyObject *, void *);
-
PyAPI_FUNC(PyObject*) PyLong_FromUnicodeObject(PyObject *u, int base);
/* _PyLong_Sign. Return 0 if v is 0, -1 if v < 0, +1 if v > 0.
# define _Py_END_SUPPRESS_IPH
#endif /* _MSC_VER >= 1900 */
+// Export for 'select' shared extension (Argument Clinic code)
+PyAPI_FUNC(int) _PyLong_FileDescriptor_Converter(PyObject *, void *);
+
#ifdef __cplusplus
}
#endif
int alternate);
// Argument converters used by Argument Clinic
+
+// Export for 'select' shared extension (Argument Clinic code)
PyAPI_FUNC(int) _PyLong_UnsignedShort_Converter(PyObject *, void *);
+
+// Export for '_testclinic' shared extension (Argument Clinic code)
PyAPI_FUNC(int) _PyLong_UnsignedInt_Converter(PyObject *, void *);
+
+// Export for '_blake2' shared extension (Argument Clinic code)
PyAPI_FUNC(int) _PyLong_UnsignedLong_Converter(PyObject *, void *);
+
+// Export for '_blake2' shared extension (Argument Clinic code)
PyAPI_FUNC(int) _PyLong_UnsignedLongLong_Converter(PyObject *, void *);
+// Export for '_testclinic' shared extension (Argument Clinic code)
+PyAPI_FUNC(int) _PyLong_Size_t_Converter(PyObject *, void *);
/* Long value tag bits:
* 0-1: Sign bits value = (1-sign), ie. negative=2, positive=0, zero=1.
# include "pycore_runtime.h" // _Py_ID()
#endif
+#include "pycore_long.h" // _PyLong_Size_t_Converter()
PyDoc_STRVAR(_winapi_Overlapped_GetOverlappedResult__doc__,
"GetOverlappedResult($self, wait, /)\n"
return return_value;
}
-/*[clinic end generated code: output=ff91ab5cae8961dd input=a9049054013a1b77]*/
+/*[clinic end generated code: output=c7e08927e163ef13 input=a9049054013a1b77]*/
# include "pycore_runtime.h" // _Py_ID()
#endif
+#include "pycore_fileutils.h" // _PyLong_FileDescriptor_Converter()
PyDoc_STRVAR(fcntl_fcntl__doc__,
"fcntl($module, fd, cmd, arg=0, /)\n"
exit:
return return_value;
}
-/*[clinic end generated code: output=705976d5f53f2272 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=5f096e8731fa38be input=a9049054013a1b77]*/
# include "pycore_runtime.h" // _Py_ID()
#endif
+#include "pycore_fileutils.h" // _PyLong_FileDescriptor_Converter()
#include "pycore_long.h" // _PyLong_UnsignedInt_Converter()
PyDoc_STRVAR(os_stat__doc__,
#ifndef OS_WAITSTATUS_TO_EXITCODE_METHODDEF
#define OS_WAITSTATUS_TO_EXITCODE_METHODDEF
#endif /* !defined(OS_WAITSTATUS_TO_EXITCODE_METHODDEF) */
-/*[clinic end generated code: output=a08a47b52da6da0b input=a9049054013a1b77]*/
+/*[clinic end generated code: output=ff0e50316f4ed71a input=a9049054013a1b77]*/
# include "pycore_runtime.h" // _Py_ID()
#endif
+#include "pycore_fileutils.h" // _PyLong_FileDescriptor_Converter()
#include "pycore_long.h" // _PyLong_UnsignedShort_Converter()
PyDoc_STRVAR(select_select__doc__,
#ifndef SELECT_KQUEUE_CONTROL_METHODDEF
#define SELECT_KQUEUE_CONTROL_METHODDEF
#endif /* !defined(SELECT_KQUEUE_CONTROL_METHODDEF) */
-/*[clinic end generated code: output=a19c29946a931dce input=a9049054013a1b77]*/
+/*[clinic end generated code: output=a215af2157f038c7 input=a9049054013a1b77]*/
# include "pycore_runtime.h" // _Py_ID()
#endif
+#include "pycore_fileutils.h" // _PyLong_FileDescriptor_Converter()
PyDoc_STRVAR(termios_tcgetattr__doc__,
"tcgetattr($module, fd, /)\n"
exit:
return return_value;
}
-/*[clinic end generated code: output=4c79a3bf87370275 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=434df4394b596e92 input=a9049054013a1b77]*/
/* fcntl module */
+#ifndef Py_BUILD_CORE_BUILTIN
+# define Py_BUILD_CORE_MODULE 1
+#endif
+
#include "Python.h"
#ifdef HAVE_SYS_FILE_H
/* termios.c -- POSIX terminal I/O module implementation. */
+#ifndef Py_BUILD_CORE_BUILTIN
+# define Py_BUILD_CORE_MODULE 1
+#endif
+
#include "Python.h"
/* Apparently, on SGI, termios.h won't define CTRL if _XOPEN_SOURCE
'multibytecodec.h',
'socketmodule.h',
- # Argument Clinic ".c.h" files
+ # Argument Clinic ".c.h" header files
'_testclinic.c.h',
'_testclinic_depr.c.h',
+ '_winapi.c.h',
+ 'fcntlmodule.c.h',
'overlapped.c.h',
'posixmodule.c.h',
'selectmodule.c.h',
'sha3module.c.h',
+ 'termios.c.h',
}
TOOL = 'gcc'
converter = '_PyLong_Size_t_Converter'
c_ignored_default = "0"
+ def converter_init(self, *, accept: TypeSet = {int, NoneType}) -> None:
+ self.add_include('pycore_long.h',
+ '_PyLong_Size_t_Converter()')
+
def parse_arg(self, argname: str, displayname: str) -> str | None:
if self.format_unit == 'n':
return """
type = 'int'
converter = '_PyLong_FileDescriptor_Converter'
+ def converter_init(self, *, accept: TypeSet = {int, NoneType}) -> None:
+ self.add_include('pycore_fileutils.h',
+ '_PyLong_FileDescriptor_Converter()')
+
def _parse_arg(self, argname: str, displayname: str) -> str | None:
return """
{paramname} = PyObject_AsFileDescriptor({argname});