Skip to content

Commit 452c78c

Browse files
committed
SIZEOF_UINTPTR_T isn't defined on Windows
1 parent e5229ce commit 452c78c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Include/internal/pycore_code.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -509,25 +509,25 @@ static inline void
509509
write_obj(uint16_t *p, PyObject *obj)
510510
{
511511
uintptr_t val = (uintptr_t)obj;
512-
#if SIZEOF_UINTPTR_T == 8
512+
#if SIZEOF_VOID_P == 8
513513
write_u64(p, val);
514-
#elif SIZEOF_UINTPTR_T == 4
514+
#elif SIZEOF_VOID_P == 4
515515
write_u32(p, val);
516516
#else
517-
#error "sizeof(uintptr_t) must be 4 or 8"
517+
#error "SIZEOF_VOID_P must be 4 or 8"
518518
#endif
519519
}
520520

521521
static inline PyObject *
522522
read_obj(uint16_t *p)
523523
{
524524
uintptr_t val;
525-
#if SIZEOF_UINTPTR_T == 8
525+
#if SIZEOF_VOID_P == 8
526526
val = read_u64(p);
527-
#elif SIZEOF_UINTPTR_T == 4
527+
#elif SIZEOF_VOID_P == 4
528528
val = read_u32(p);
529529
#else
530-
#error "sizeof(uintptr_t) must be 4 or 8"
530+
#error "SIZEOF_VOID_P must be 4 or 8"
531531
#endif
532532
return (PyObject *)val;
533533
}

0 commit comments

Comments
 (0)