Skip to content

Commit a2c4ca0

Browse files
committed
string_bytes: properly detect 64bit
1 parent 5fc8efb commit a2c4ca0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/string_bytes.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ static bool contains_non_ascii(const char* src, size_t len) {
387387
}
388388

389389

390-
#if BITS_PER_LONG == 64
390+
#if defined(__x86_64__) || defined(_WIN64)
391391
const uintptr_t mask = 0x8080808080808080ll;
392392
#else
393393
const uintptr_t mask = 0x80808080l;
@@ -440,7 +440,7 @@ static void force_ascii(const char* src, char* dst, size_t len) {
440440
}
441441
}
442442

443-
#if BITS_PER_LONG == 64
443+
#if defined(__x86_64__) || defined(_WIN64)
444444
const uintptr_t mask = ~0x8080808080808080ll;
445445
#else
446446
const uintptr_t mask = ~0x80808080l;

0 commit comments

Comments
 (0)