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

Lines changed: 6 additions & 6 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy