@@ -614,7 +614,7 @@ _Py_fstat_noraise(int fd, struct _Py_stat_struct *status)
614
614
HANDLE h ;
615
615
int type ;
616
616
617
- h = ( HANDLE ) _Py_get_osfhandle_noraise (fd );
617
+ h = _Py_get_osfhandle_noraise (fd );
618
618
619
619
if (h == INVALID_HANDLE_VALUE ) {
620
620
/* errno is already set by _get_osfhandle, but we also set
@@ -737,7 +737,7 @@ get_inheritable(int fd, int raise)
737
737
HANDLE handle ;
738
738
DWORD flags ;
739
739
740
- handle = ( HANDLE ) _Py_get_osfhandle_noraise (fd );
740
+ handle = _Py_get_osfhandle_noraise (fd );
741
741
if (handle == INVALID_HANDLE_VALUE ) {
742
742
if (raise )
743
743
PyErr_SetFromErrno (PyExc_OSError );
@@ -806,7 +806,7 @@ set_inheritable(int fd, int inheritable, int raise, int *atomic_flag_works)
806
806
}
807
807
808
808
#ifdef MS_WINDOWS
809
- handle = ( HANDLE ) _Py_get_osfhandle_noraise (fd );
809
+ handle = _Py_get_osfhandle_noraise (fd );
810
810
if (handle == INVALID_HANDLE_VALUE ) {
811
811
if (raise )
812
812
PyErr_SetFromErrno (PyExc_OSError );
@@ -1459,7 +1459,7 @@ _Py_dup(int fd)
1459
1459
#endif
1460
1460
1461
1461
#ifdef MS_WINDOWS
1462
- handle = ( HANDLE ) _Py_get_osfhandle (fd );
1462
+ handle = _Py_get_osfhandle (fd );
1463
1463
if (handle == INVALID_HANDLE_VALUE )
1464
1464
return -1 ;
1465
1465
@@ -1576,34 +1576,34 @@ _Py_set_blocking(int fd, int blocking)
1576
1576
return -1 ;
1577
1577
}
1578
1578
#else /* MS_WINDOWS */
1579
- intptr_t
1579
+ void *
1580
1580
_Py_get_osfhandle_noraise (int fd )
1581
1581
{
1582
1582
_Py_BEGIN_SUPPRESS_IPH
1583
- return _get_osfhandle (fd );
1583
+ return ( void * ) _get_osfhandle (fd );
1584
1584
_Py_END_SUPPRESS_IPH
1585
1585
}
1586
1586
1587
- intptr_t
1587
+ void *
1588
1588
_Py_get_osfhandle (int fd )
1589
1589
{
1590
- intptr_t handle = _Py_get_osfhandle_noraise (fd );
1591
- if (handle == ( intptr_t ) INVALID_HANDLE_VALUE )
1590
+ void * handle = _Py_get_osfhandle_noraise (fd );
1591
+ if (handle == INVALID_HANDLE_VALUE )
1592
1592
PyErr_SetFromErrno (PyExc_OSError );
1593
1593
1594
1594
return handle ;
1595
1595
}
1596
1596
1597
1597
int
1598
- _Py_open_osfhandle_noraise (intptr_t handle , int flags )
1598
+ _Py_open_osfhandle_noraise (void * handle , int flags )
1599
1599
{
1600
1600
_Py_BEGIN_SUPPRESS_IPH
1601
- return _open_osfhandle (handle , flags );
1601
+ return _open_osfhandle (( intptr_t ) handle , flags );
1602
1602
_Py_END_SUPPRESS_IPH
1603
1603
}
1604
1604
1605
1605
int
1606
- _Py_open_osfhandle (intptr_t handle , int flags )
1606
+ _Py_open_osfhandle (void * handle , int flags )
1607
1607
{
1608
1608
int fd = _Py_open_osfhandle_noraise (handle , flags );
1609
1609
if (fd == -1 )
0 commit comments