Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
XadillaX committed May 31, 2021
1 parent e76b5ef commit 93c35eb
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/node_url.cc
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ constexpr char kEOL = -1;
// Used in ToUSVString().
constexpr char16_t kUnicodeReplacementCharacter = 0xFFFD;

#define NS_IN6ADDRSZ 16
#define NS_INT16SZ 2

// https://url.spec.whatwg.org/#concept-host
class URLHost {
public:
Expand Down Expand Up @@ -81,7 +78,7 @@ class URLHost {
union Value {
std::string domain_or_opaque;
uint32_t ipv4;
uint16_t ipv6[NS_IN6ADDRSZ / NS_INT16SZ];
uint16_t ipv6[8];

~Value() {}
Value() : ipv4(0) {}
Expand Down Expand Up @@ -800,6 +797,8 @@ bool ToASCII(const std::string& input, std::string* output) {
}
#endif

#define NS_IN6ADDRSZ 16

void URLHost::ParseIPv6Host(const char* input, size_t length) {
CHECK_EQ(type_, HostType::H_FAILED);

Expand Down

0 comments on commit 93c35eb

Please sign in to comment.