Skip to content

Commit fe393f4

Browse files
committed
Use intptr_t/uintptr_t on Windows
1 parent b600fe9 commit fe393f4

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

Include/Python.h

+5
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@
4141
#include <unistd.h>
4242
#endif
4343

44+
/* For uintptr_t, intptr_t */
45+
#ifdef HAVE_STDDEF_H
46+
#include <stddef.h>
47+
#endif
48+
4449
/* CAUTION: Build setups should ensure that NDEBUG is defined on the
4550
* compiler command line when building Python in release mode; else
4651
* assert() calls won't be removed.

PC/pyconfig.h

+8
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,11 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */
267267
#define SIZEOF_LONG 4
268268
#define SIZEOF_LONG_LONG 8
269269

270+
/* Atleast VC 7.1 has them. If some compiler does not provide them,
271+
#ifdef appropriately .*/
272+
#define HAVE_UINTPTR_T 1
273+
#define HAVE_INTPTR_T 1
274+
270275
#endif
271276

272277
/* Fairly standard from here! */
@@ -484,6 +489,9 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */
484489
/* Define if you have the <stdarg.h> prototypes. */
485490
#define HAVE_STDARG_PROTOTYPES
486491

492+
/* Define if you have the <stddef.h> header file. */
493+
#define HAVE_STDDEF_H 1
494+
487495
/* Define if you have the <sys/audioio.h> header file. */
488496
/* #undef HAVE_SYS_AUDIOIO_H */
489497

0 commit comments

Comments
 (0)