@@ -35,8 +35,10 @@ typedef enum {
3535 _Py_ERROR_OTHER
3636} _Py_error_handler ;
3737
38+ // Export for '_testinternalcapi' shared extension
3839PyAPI_FUNC (_Py_error_handler ) _Py_GetErrorHandler (const char * errors );
3940
41+ // Export for '_testinternalcapi' shared extension
4042PyAPI_FUNC (int ) _Py_DecodeLocaleEx (
4143 const char * arg ,
4244 wchar_t * * wstr ,
@@ -45,6 +47,7 @@ PyAPI_FUNC(int) _Py_DecodeLocaleEx(
4547 int current_locale ,
4648 _Py_error_handler errors );
4749
50+ // Export for '_testinternalcapi' shared extension
4851PyAPI_FUNC (int ) _Py_EncodeLocaleEx (
4952 const wchar_t * text ,
5053 char * * str ,
@@ -98,23 +101,26 @@ struct _Py_stat_struct {
98101# define _Py_stat_struct stat
99102#endif
100103
104+ // Export for 'mmap' shared extension
101105PyAPI_FUNC (int ) _Py_fstat (
102106 int fd ,
103107 struct _Py_stat_struct * status );
104108
109+ // Export for 'mmap' shared extension
105110PyAPI_FUNC (int ) _Py_fstat_noraise (
106111 int fd ,
107112 struct _Py_stat_struct * status );
108113
109- PyAPI_FUNC ( int ) _Py_stat (
114+ extern int _Py_stat (
110115 PyObject * path ,
111116 struct stat * status );
112117
113- // Export for 'select' shared extension (Solaris newDevPollObject() uses it )
118+ // Export for 'select' shared extension (Solaris newDevPollObject())
114119PyAPI_FUNC (int ) _Py_open (
115120 const char * pathname ,
116121 int flags );
117122
123+ // Export for '_posixsubprocess' shared extension
118124PyAPI_FUNC (int ) _Py_open_noraise (
119125 const char * pathname ,
120126 int flags );
@@ -128,12 +134,13 @@ extern Py_ssize_t _Py_read(
128134 void * buf ,
129135 size_t count );
130136
131- // Export for 'select' shared extension (Solaris devpoll_flush() uses it )
137+ // Export for 'select' shared extension (Solaris devpoll_flush())
132138PyAPI_FUNC (Py_ssize_t ) _Py_write (
133139 int fd ,
134140 const void * buf ,
135141 size_t count );
136142
143+ // Export for '_posixsubprocess' shared extension
137144PyAPI_FUNC (Py_ssize_t ) _Py_write_noraise (
138145 int fd ,
139146 const void * buf ,
@@ -165,12 +172,15 @@ extern wchar_t* _Py_wgetcwd(
165172
166173extern int _Py_get_inheritable (int fd );
167174
175+ // Export for '_socket' shared extension
168176PyAPI_FUNC (int ) _Py_set_inheritable (int fd , int inheritable ,
169177 int * atomic_flag_works );
170178
179+ // Export for '_posixsubprocess' shared extension
171180PyAPI_FUNC (int ) _Py_set_inheritable_async_safe (int fd , int inheritable ,
172181 int * atomic_flag_works );
173182
183+ // Export for '_socket' shared extension
174184PyAPI_FUNC (int ) _Py_dup (int fd );
175185
176186extern int _Py_get_blocking (int fd );
@@ -180,6 +190,7 @@ extern int _Py_set_blocking(int fd, int blocking);
180190#ifdef MS_WINDOWS
181191extern void * _Py_get_osfhandle_noraise (int fd );
182192
193+ // Export for '_testconsole' shared extension
183194PyAPI_FUNC (void * ) _Py_get_osfhandle (int fd );
184195
185196extern int _Py_open_osfhandle_noraise (void * handle , int flags );
@@ -234,7 +245,7 @@ extern int _Py_GetLocaleconvNumeric(
234245 PyObject * * decimal_point ,
235246 PyObject * * thousands_sep );
236247
237- PyAPI_FUNC ( void ) _Py_closerange (int first , int last );
248+ extern void _Py_closerange (int first , int last );
238249
239250extern wchar_t * _Py_GetLocaleEncoding (void );
240251extern PyObject * _Py_GetLocaleEncodingObject (void );
@@ -262,7 +273,10 @@ extern int _Py_add_relfile(wchar_t *dirname,
262273 const wchar_t * relfile ,
263274 size_t bufsize );
264275extern size_t _Py_find_basename (const wchar_t * filename );
276+
277+ // Export for '_testinternalcapi' shared extension
265278PyAPI_FUNC (wchar_t * ) _Py_normpath (wchar_t * path , Py_ssize_t size );
279+
266280extern wchar_t * _Py_normpath_and_size (wchar_t * path , Py_ssize_t size , Py_ssize_t * length );
267281
268282// The Windows Games API family does not provide these functions
0 commit comments