diff options
author | Jens Hamisch <jens@Strawberry.COM> | 2000-11-14 20:16:23 +0100 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-11-15 02:20:12 +0000 |
commit | d7578b48f7f0f6fe2e06a87cf3e42a80af5a338f (patch) | |
tree | b15e7fde02e6a43a8aeec8f77d661f9914a8c8da /utf8.h | |
parent | e8c951909ff48204642537ff8810d8cd16a0dee9 (diff) | |
download | perl-d7578b48f7f0f6fe2e06a87cf3e42a80af5a338f.tar.gz |
Use UINT64_C().
Subject: [ID 20001114.006] 5.7.0-7680 Solaris 8, 64 bit, utf8 patch
Message-Id: <20001114191623.G20559@Strawberry.COM>
p4raw-id: //depot/perl@7691
Diffstat (limited to 'utf8.h')
-rw-r--r-- | utf8.h | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -9,6 +9,8 @@ START_EXTERN_C +#include "handy.h" + #ifdef DOINIT EXTCONST unsigned char PL_utf8skip[] = { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* ascii */ @@ -48,6 +50,8 @@ END_EXTERN_C #define UTF8SKIP(s) PL_utf8skip[*(U8*)s] +#define UTF8_QUAD_MAX UINT64_C(0x1000000000) + #ifdef HAS_QUAD #define UNISKIP(uv) ( (uv) < 0x80 ? 1 : \ (uv) < 0x800 ? 2 : \ @@ -55,7 +59,7 @@ END_EXTERN_C (uv) < 0x200000 ? 4 : \ (uv) < 0x4000000 ? 5 : \ (uv) < 0x80000000 ? 6 : \ - (uv) < 0x1000000000LL ? 7 : 13 ) + (uv) < UTF8_QUAD_MAX ? 7 : 13 ) #else /* No, I'm not even going to *TRY* putting #ifdef inside a #define */ #define UNISKIP(uv) ( (uv) < 0x80 ? 1 : \ |