mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
string_bytes: properly detect 64bit
This commit is contained in:
1 parent
5fc8efb87d
commit
a2c4ca09ed
1 file changed
+2
-2
+2
-2
@@ -387,7 +387,7 @@ static bool contains_non_ascii(const char* src, size_t len) {
|
||||
}
|
||||
|
||||
|
||||
#if BITS_PER_LONG == 64
|
||||
#if defined(__x86_64__) || defined(_WIN64)
|
||||
const uintptr_t mask = 0x8080808080808080ll;
|
||||
#else
|
||||
const uintptr_t mask = 0x80808080l;
|
||||
@@ -440,7 +440,7 @@ static void force_ascii(const char* src, char* dst, size_t len) {
|
||||
}
|
||||
}
|
||||
|
||||
#if BITS_PER_LONG == 64
|
||||
#if defined(__x86_64__) || defined(_WIN64)
|
||||
const uintptr_t mask = ~0x8080808080808080ll;
|
||||
#else
|
||||
const uintptr_t mask = ~0x80808080l;
|
||||
|
||||
Reference in new issue
Block a user