summaryrefslogtreecommitdiff
path: root/Include/fileutils.h
diff options
context:
space:
mode:
Diffstat (limited to 'Include/fileutils.h')
-rw-r--r--Include/fileutils.h22
1 files changed, 4 insertions, 18 deletions
diff --git a/Include/fileutils.h b/Include/fileutils.h
index b4a683c176..b933e98539 100644
--- a/Include/fileutils.h
+++ b/Include/fileutils.h
@@ -5,8 +5,7 @@
extern "C" {
#endif
-PyAPI_FUNC(PyObject *) _Py_device_encoding(int);
-
+#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03050000
PyAPI_FUNC(wchar_t *) Py_DecodeLocale(
const char *arg,
size_t *size);
@@ -14,9 +13,12 @@ PyAPI_FUNC(wchar_t *) Py_DecodeLocale(
PyAPI_FUNC(char*) Py_EncodeLocale(
const wchar_t *text,
size_t *error_pos);
+#endif
#ifndef Py_LIMITED_API
+PyAPI_FUNC(PyObject *) _Py_device_encoding(int);
+
#ifdef MS_WINDOWS
struct _Py_stat_struct {
unsigned long st_dev;
@@ -46,13 +48,11 @@ PyAPI_FUNC(int) _Py_fstat(
PyAPI_FUNC(int) _Py_fstat_noraise(
int fd,
struct _Py_stat_struct *status);
-#endif /* Py_LIMITED_API */
PyAPI_FUNC(int) _Py_stat(
PyObject *path,
struct stat *status);
-#ifndef Py_LIMITED_API
PyAPI_FUNC(int) _Py_open(
const char *pathname,
int flags);
@@ -60,7 +60,6 @@ PyAPI_FUNC(int) _Py_open(
PyAPI_FUNC(int) _Py_open_noraise(
const char *pathname,
int flags);
-#endif
PyAPI_FUNC(FILE *) _Py_wfopen(
const wchar_t *path,
@@ -107,7 +106,6 @@ PyAPI_FUNC(wchar_t*) _Py_wgetcwd(
wchar_t *buf,
size_t size);
-#ifndef Py_LIMITED_API
PyAPI_FUNC(int) _Py_get_inheritable(int fd);
PyAPI_FUNC(int) _Py_set_inheritable(int fd, int inheritable,
@@ -121,18 +119,6 @@ PyAPI_FUNC(int) _Py_get_blocking(int fd);
PyAPI_FUNC(int) _Py_set_blocking(int fd, int blocking);
#endif /* !MS_WINDOWS */
-#if defined _MSC_VER && _MSC_VER >= 1400 && _MSC_VER < 1900
-/* A routine to check if a file descriptor is valid on Windows. Returns 0
- * and sets errno to EBADF if it isn't. This is to avoid Assertions
- * from various functions in the Windows CRT beginning with
- * Visual Studio 2005
- */
-int _PyVerify_fd(int fd);
-
-#else
-#define _PyVerify_fd(A) (1) /* dummy */
-#endif
-
#endif /* Py_LIMITED_API */
#ifdef __cplusplus