Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6947d0b

Browse files
author
Fredrik Lundh
committed
-- from Trent Mick: [Patch #101010] replace use of INT_PTR
with uintptr_t (fix MSVC 5.0 build)
1 parent 6c2f0c7 commit 6947d0b

2 files changed

Lines changed: 3 additions & 7 deletions

File tree

PC/config.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,13 +241,13 @@ typedef int pid_t;
241241

242242
/* End of compilers - finish up */
243243

244-
/* define the ANSI intptr_t type for portable use of a pointer sized
245-
integer */
244+
/* define some ANSI types that are not defined in earlier Win headers */
246245
#if _MSC_VER >= 1200 /* This file only exists in VC 6.0 or higher */
247246
#include <basetsd.h>
248247
#endif
249248
#if defined(MS_WINDOWS) && !defined(MS_WIN64)
250249
typedef long intptr_t;
250+
typedef unsigned long uintptr_t;
251251
#endif
252252

253253
#if defined(MS_WIN64)

Python/thread_nt.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,7 @@ static void PyThread__init_thread(void)
161161
*/
162162
int PyThread_start_new_thread(void (*func)(void *), void *arg)
163163
{
164-
#if _MSC_VER >= 1200
165-
INT_PTR rv;
166-
#else
167-
unsigned long rv;
168-
#endif
164+
uintptr_t rv;
169165
int success = 0;
170166

171167
dprintf(("%ld: PyThread_start_new_thread called\n", PyThread_get_thread_ident()));

0 commit comments

Comments
 (0)