diff options
author | Nick Coghlan <ncoghlan@gmail.com> | 2017-02-09 16:08:17 +0100 |
---|---|---|
committer | Nick Coghlan <ncoghlan@gmail.com> | 2017-02-09 16:08:17 +0100 |
commit | c6180bb73c8c7c7f9d8ea9816487b710597b6fc1 (patch) | |
tree | fb4a5c18886537b4b7df46ed3b2aa579747ff507 /Include/fileutils.h | |
parent | 5e0114a832a903518c4af6983161c0c2a8942a24 (diff) | |
parent | 819a21a3a4aac38f32e1ba4f68bcef45591fa3f0 (diff) | |
download | cpython-c6180bb73c8c7c7f9d8ea9816487b710597b6fc1.tar.gz |
Merge issue #26355 fix from Python 3.5
Diffstat (limited to 'Include/fileutils.h')
-rw-r--r-- | Include/fileutils.h | 22 |
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 |