]> granicus.if.org Git - python/commitdiff
-- from Trent Mick: [Patch #101010] replace use of INT_PTR
authorFredrik Lundh <fredrik@pythonware.com>
Mon, 7 Aug 2000 20:16:28 +0000 (20:16 +0000)
committerFredrik Lundh <fredrik@pythonware.com>
Mon, 7 Aug 2000 20:16:28 +0000 (20:16 +0000)
   with uintptr_t (fix MSVC 5.0 build)

PC/config.h
Python/thread_nt.h

index 9b683734cb51f22643059e059b1968fb10a66a48..f1b0de77aed788226713857265f660c2764a3b04 100644 (file)
@@ -241,13 +241,13 @@ typedef int pid_t;
 
 /* End of compilers - finish up */
 
-/* define the ANSI intptr_t type for portable use of a pointer sized
-   integer */
+/* define some ANSI types that are not defined in earlier Win headers */
 #if _MSC_VER >= 1200 /* This file only exists in VC 6.0 or higher */
 #include <basetsd.h>
 #endif
 #if defined(MS_WINDOWS) && !defined(MS_WIN64)
 typedef long intptr_t;
+typedef unsigned long uintptr_t;
 #endif
 
 #if defined(MS_WIN64)
index 9d418207777d63cb403471d7f98b44dce0319cda..5e295cbce4f27beac354717fb58898b2233150c7 100644 (file)
@@ -161,11 +161,7 @@ static void PyThread__init_thread(void)
  */
 int PyThread_start_new_thread(void (*func)(void *), void *arg)
 {
-#if _MSC_VER >= 1200
-       INT_PTR rv;
-#else
-       unsigned long rv;
-#endif
+       uintptr_t rv;
        int success = 0;
 
        dprintf(("%ld: PyThread_start_new_thread called\n", PyThread_get_thread_ident()));