diff --git a/Objects/stringlib/codecs.h b/Objects/stringlib/codecs.h index 63bf648d788..7d55f49a003 100644 --- a/Objects/stringlib/codecs.h +++ b/Objects/stringlib/codecs.h @@ -8,9 +8,9 @@ /* Mask to quickly check whether a C 'long' contains a non-ASCII, UTF8-encoded char. */ #if (SIZEOF_LONG == 8) -# define ASCII_CHAR_MASK 0x8080808080808080L +# define ASCII_CHAR_MASK 0x8080808080808080UL #elif (SIZEOF_LONG == 4) -# define ASCII_CHAR_MASK 0x80808080L +# define ASCII_CHAR_MASK 0x80808080UL #else # error C 'long' size should be either 4 or 8! #endif diff --git a/Objects/stringlib/find_max_char.h b/Objects/stringlib/find_max_char.h index 098aeec46a5..9e344a0de95 100644 --- a/Objects/stringlib/find_max_char.h +++ b/Objects/stringlib/find_max_char.h @@ -8,9 +8,9 @@ /* Mask to quickly check whether a C 'long' contains a non-ASCII, UTF8-encoded char. */ #if (SIZEOF_LONG == 8) -# define UCS1_ASCII_CHAR_MASK 0x8080808080808080L +# define UCS1_ASCII_CHAR_MASK 0x8080808080808080UL #elif (SIZEOF_LONG == 4) -# define UCS1_ASCII_CHAR_MASK 0x80808080L +# define UCS1_ASCII_CHAR_MASK 0x80808080UL #else # error C 'long' size should be either 4 or 8! #endif diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 353d2bbf2fa..3e3abfc237e 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -4639,9 +4639,9 @@ PyUnicode_DecodeUTF8(const char *s, /* Mask to quickly check whether a C 'long' contains a non-ASCII, UTF8-encoded char. */ #if (SIZEOF_LONG == 8) -# define ASCII_CHAR_MASK 0x8080808080808080L +# define ASCII_CHAR_MASK 0x8080808080808080UL #elif (SIZEOF_LONG == 4) -# define ASCII_CHAR_MASK 0x80808080L +# define ASCII_CHAR_MASK 0x80808080UL #else # error C 'long' size should be either 4 or 8! #endif