Skip to content

Commit 93c35eb

Browse files
committed
f
1 parent e76b5ef commit 93c35eb

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/node_url.cc

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,6 @@ constexpr char kEOL = -1;
4848
// Used in ToUSVString().
4949
constexpr char16_t kUnicodeReplacementCharacter = 0xFFFD;
5050

51-
#define NS_IN6ADDRSZ 16
52-
#define NS_INT16SZ 2
53-
5451
// https://url.spec.whatwg.org/#concept-host
5552
class URLHost {
5653
public:
@@ -81,7 +78,7 @@ class URLHost {
8178
union Value {
8279
std::string domain_or_opaque;
8380
uint32_t ipv4;
84-
uint16_t ipv6[NS_IN6ADDRSZ / NS_INT16SZ];
81+
uint16_t ipv6[8];
8582

8683
~Value() {}
8784
Value() : ipv4(0) {}
@@ -800,6 +797,8 @@ bool ToASCII(const std::string& input, std::string* output) {
800797
}
801798
#endif
802799

800+
#define NS_IN6ADDRSZ 16
801+
803802
void URLHost::ParseIPv6Host(const char* input, size_t length) {
804803
CHECK_EQ(type_, HostType::H_FAILED);
805804

0 commit comments

Comments
 (0)