Skip to content

Commit d467e03

Browse files
nodejs-github-botCeres6
authored andcommitted
deps: update ada to 2.5.1
PR-URL: nodejs#48319 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
1 parent f7bbfd1 commit d467e03

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

deps/ada/ada.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* auto-generated on 2023-05-25 16:09:25 -0400. Do not edit! */
1+
/* auto-generated on 2023-06-03 12:40:57 -0400. Do not edit! */
22
/* begin file src/ada.cpp */
33
#include "ada.h"
44
/* begin file src/checkers.cpp */

deps/ada/ada.h

+14-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* auto-generated on 2023-05-25 16:09:25 -0400. Do not edit! */
1+
/* auto-generated on 2023-06-03 12:40:57 -0400. Do not edit! */
22
/* begin file include/ada.h */
33
/**
44
* @file ada.h
@@ -5544,7 +5544,11 @@ ada_really_inline size_t url::parse_port(std::string_view view,
55445544
}
55455545
ada_log("parse_port: is_valid = ", is_valid);
55465546
if (is_valid) {
5547-
port = (r.ec == std::errc() && scheme_default_port() != parsed_port)
5547+
// scheme_default_port can return 0, and we should allow 0 as a base port.
5548+
auto default_port = scheme_default_port();
5549+
bool is_port_valid = (default_port == 0 && parsed_port == 0) ||
5550+
(default_port != parsed_port);
5551+
port = (r.ec == std::errc() && is_port_valid)
55485552
? std::optional<uint16_t>(parsed_port)
55495553
: std::nullopt;
55505554
}
@@ -6428,7 +6432,12 @@ ada_really_inline size_t url_aggregator::parse_port(
64286432
}
64296433
ada_log("parse_port: is_valid = ", is_valid);
64306434
if (is_valid) {
6431-
if (r.ec == std::errc() && scheme_default_port() != parsed_port) {
6435+
ada_log("parse_port", r.ec == std::errc());
6436+
// scheme_default_port can return 0, and we should allow 0 as a base port.
6437+
auto default_port = scheme_default_port();
6438+
bool is_port_valid = (default_port == 0 && parsed_port == 0) ||
6439+
(default_port != parsed_port);
6440+
if (r.ec == std::errc() && is_port_valid) {
64326441
update_base_port(parsed_port);
64336442
} else {
64346443
clear_port();
@@ -6485,14 +6494,14 @@ inline std::ostream &operator<<(std::ostream &out,
64856494
#ifndef ADA_ADA_VERSION_H
64866495
#define ADA_ADA_VERSION_H
64876496

6488-
#define ADA_VERSION "2.5.0"
6497+
#define ADA_VERSION "2.5.1"
64896498

64906499
namespace ada {
64916500

64926501
enum {
64936502
ADA_VERSION_MAJOR = 2,
64946503
ADA_VERSION_MINOR = 5,
6495-
ADA_VERSION_REVISION = 0,
6504+
ADA_VERSION_REVISION = 1,
64966505
};
64976506

64986507
} // namespace ada

0 commit comments

Comments
 (0)