1- /* auto-generated on 2024-01-29 13:13:24 -0500. Do not edit! */
1+ /* auto-generated on 2024-03-07 13:23:39 -0500. Do not edit! */
22/* begin file include/ada.h */
33/* *
44 * @file ada.h
@@ -482,6 +482,9 @@ namespace ada {
482482#include < cstdint>
483483
484484/* *
485+ * These functions are not part of our public API and may
486+ * change at any time.
487+ * @private
485488 * @namespace ada::character_sets
486489 * @brief Includes the definitions for unicode character sets.
487490 */
@@ -492,6 +495,11 @@ ada_really_inline bool bit_at(const uint8_t a[], uint8_t i);
492495#endif // ADA_CHARACTER_SETS_H
493496/* end file include/ada/character_sets.h */
494497
498+ /* *
499+ * These functions are not part of our public API and may
500+ * change at any time.
501+ * @private
502+ */
495503namespace ada ::character_sets {
496504
497505constexpr char hex[1024 ] =
@@ -936,7 +944,7 @@ constexpr uint8_t WWW_FORM_URLENCODED_PERCENT_ENCODE[32] = {
936944 // 20 21 22 23 24 25 26 27
937945 0x00 | 0x02 | 0x04 | 0x08 | 0x10 | 0x20 | 0x40 | 0x80 ,
938946 // 28 29 2A 2B 2C 2D 2E 2F
939- 0x01 | 0x02 | 0x00 | 0x08 | 0x10 | 0x00 | 0x00 | 0x00 ,
947+ 0x01 | 0x02 | 0x00 | 0x08 | 0x10 | 0x00 | 0x00 | 0x80 ,
940948 // 30 31 32 33 34 35 36 37
941949 0x00 | 0x00 | 0x00 | 0x00 | 0x00 | 0x00 | 0x00 | 0x00 ,
942950 // 38 39 3A 3B 3C 3D 3E 3F
@@ -1540,6 +1548,9 @@ struct url_base {
15401548#include < optional>
15411549
15421550/* *
1551+ * These functions are not part of our public API and may
1552+ * change at any time.
1553+ *
15431554 * @private
15441555 * @namespace ada::helpers
15451556 * @brief Includes the definitions for helper functions
@@ -1702,6 +1713,7 @@ inline void inner_concat(std::string& buffer, T t, Args... args) {
17021713}
17031714
17041715/* *
1716+ * @private
17051717 * Concatenate the arguments and return a string.
17061718 * @returns a string
17071719 */
@@ -1713,6 +1725,7 @@ std::string concat(Args... args) {
17131725}
17141726
17151727/* *
1728+ * @private
17161729 * @return Number of leading zeroes.
17171730 */
17181731inline int leading_zeroes (uint32_t input_num) noexcept {
@@ -1726,6 +1739,7 @@ inline int leading_zeroes(uint32_t input_num) noexcept {
17261739}
17271740
17281741/* *
1742+ * @private
17291743 * Counts the number of decimal digits necessary to represent x.
17301744 * faster than std::to_string(x).size().
17311745 * @return digit count
@@ -4434,12 +4448,17 @@ std::string ipv4(uint64_t address) noexcept;
44344448#include < optional>
44354449
44364450/* *
4451+ * Unicode operations. These functions are not part of our public API and may
4452+ * change at any time.
4453+ *
4454+ * @private
44374455 * @namespace ada::unicode
44384456 * @brief Includes the definitions for unicode operations
44394457 */
44404458namespace ada ::unicode {
44414459
44424460/* *
4461+ * @private
44434462 * We receive a UTF-8 string representing a domain name.
44444463 * If the string is percent encoded, we apply percent decoding.
44454464 *
@@ -4483,11 +4502,13 @@ bool to_ascii(std::optional<std::string>& out, std::string_view plain,
44834502 size_t first_percent);
44844503
44854504/* *
4505+ * @private
44864506 * @see https://www.unicode.org/reports/tr46/#ToUnicode
44874507 */
44884508std::string to_unicode (std::string_view input);
44894509
44904510/* *
4511+ * @private
44914512 * Checks if the input has tab or newline characters.
44924513 *
44934514 * @attention The has_tabs_or_newline function is a bottleneck and it is simple
@@ -4497,19 +4518,22 @@ ada_really_inline bool has_tabs_or_newline(
44974518 std::string_view user_input) noexcept ;
44984519
44994520/* *
4521+ * @private
45004522 * Checks if the input is a forbidden host code point.
45014523 * @see https://url.spec.whatwg.org/#forbidden-host-code-point
45024524 */
45034525ada_really_inline constexpr bool is_forbidden_host_code_point (char c) noexcept ;
45044526
45054527/* *
4528+ * @private
45064529 * Checks if the input contains a forbidden domain code point.
45074530 * @see https://url.spec.whatwg.org/#forbidden-domain-code-point
45084531 */
45094532ada_really_inline constexpr bool contains_forbidden_domain_code_point (
45104533 const char * input, size_t length) noexcept ;
45114534
45124535/* *
4536+ * @private
45134537 * Checks if the input contains a forbidden domain code point in which case
45144538 * the first bit is set to 1. If the input contains an upper case ASCII letter,
45154539 * then the second bit is set to 1.
@@ -4520,18 +4544,21 @@ contains_forbidden_domain_code_point_or_upper(const char* input,
45204544 size_t length) noexcept ;
45214545
45224546/* *
4547+ * @private
45234548 * Checks if the input is a forbidden domain code point.
45244549 * @see https://url.spec.whatwg.org/#forbidden-domain-code-point
45254550 */
45264551ada_really_inline constexpr bool is_forbidden_domain_code_point (
45274552 char c) noexcept ;
45284553
45294554/* *
4555+ * @private
45304556 * Checks if the input is alphanumeric, '+', '-' or '.'
45314557 */
45324558ada_really_inline constexpr bool is_alnum_plus (char c) noexcept ;
45334559
45344560/* *
4561+ * @private
45354562 * @details An ASCII hex digit is an ASCII upper hex digit or ASCII lower hex
45364563 * digit. An ASCII upper hex digit is an ASCII digit or a code point in the
45374564 * range U+0041 (A) to U+0046 (F), inclusive. An ASCII lower hex digit is an
@@ -4540,6 +4567,7 @@ ada_really_inline constexpr bool is_alnum_plus(char c) noexcept;
45404567ada_really_inline constexpr bool is_ascii_hex_digit (char c) noexcept ;
45414568
45424569/* *
4570+ * @private
45434571 * Checks if the input is a C0 control or space character.
45444572 *
45454573 * @details A C0 control or space is a C0 control or U+0020 SPACE.
@@ -4549,38 +4577,44 @@ ada_really_inline constexpr bool is_ascii_hex_digit(char c) noexcept;
45494577ada_really_inline constexpr bool is_c0_control_or_space (char c) noexcept ;
45504578
45514579/* *
4580+ * @private
45524581 * Checks if the input is a ASCII tab or newline character.
45534582 *
45544583 * @details An ASCII tab or newline is U+0009 TAB, U+000A LF, or U+000D CR.
45554584 */
45564585ada_really_inline constexpr bool is_ascii_tab_or_newline (char c) noexcept ;
45574586
45584587/* *
4588+ * @private
45594589 * @details A double-dot path segment must be ".." or an ASCII case-insensitive
45604590 * match for ".%2e", "%2e.", or "%2e%2e".
45614591 */
45624592ada_really_inline ada_constexpr bool is_double_dot_path_segment (
45634593 std::string_view input) noexcept ;
45644594
45654595/* *
4596+ * @private
45664597 * @details A single-dot path segment must be "." or an ASCII case-insensitive
45674598 * match for "%2e".
45684599 */
45694600ada_really_inline constexpr bool is_single_dot_path_segment (
45704601 std::string_view input) noexcept ;
45714602
45724603/* *
4604+ * @private
45734605 * @details ipv4 character might contain 0-9 or a-f character ranges.
45744606 */
45754607ada_really_inline constexpr bool is_lowercase_hex (char c) noexcept ;
45764608
45774609/* *
4610+ * @private
45784611 * @details Convert hex to binary. Caller is responsible to ensure that
45794612 * the parameter is an hexadecimal digit (0-9, A-F, a-f).
45804613 */
45814614ada_really_inline unsigned constexpr convert_hex_to_binary (char c) noexcept ;
45824615
45834616/* *
4617+ * @private
45844618 * first_percent should be = input.find('%')
45854619 *
45864620 * @todo It would be faster as noexcept maybe, but it could be unsafe since.
@@ -4591,19 +4625,22 @@ ada_really_inline unsigned constexpr convert_hex_to_binary(char c) noexcept;
45914625std::string percent_decode (std::string_view input, size_t first_percent);
45924626
45934627/* *
4628+ * @private
45944629 * Returns a percent-encoding string whether percent encoding was needed or not.
45954630 * @see https://github.com/nodejs/node/blob/main/src/node_url.cc#L226
45964631 */
45974632std::string percent_encode (std::string_view input,
45984633 const uint8_t character_set[]);
45994634/* *
4635+ * @private
46004636 * Returns a percent-encoded string version of input, while starting the percent
46014637 * encoding at the provided index.
46024638 * @see https://github.com/nodejs/node/blob/main/src/node_url.cc#L226
46034639 */
46044640std::string percent_encode (std::string_view input,
46054641 const uint8_t character_set[], size_t index);
46064642/* *
4643+ * @private
46074644 * Returns true if percent encoding was needed, in which case, we store
46084645 * the percent-encoded content in 'out'. If the boolean 'append' is set to
46094646 * true, the content is appended to 'out'.
@@ -4614,12 +4651,14 @@ template <bool append>
46144651bool percent_encode (std::string_view input, const uint8_t character_set[],
46154652 std::string& out);
46164653/* *
4654+ * @private
46174655 * Returns the index at which percent encoding should start, or (equivalently),
46184656 * the length of the prefix that does not require percent encoding.
46194657 */
46204658ada_really_inline size_t percent_encode_index (std::string_view input,
46214659 const uint8_t character_set[]);
46224660/* *
4661+ * @private
46234662 * Lowers the string in-place, assuming that the content is ASCII.
46244663 * Return true if the content was ASCII.
46254664 */
@@ -4957,19 +4996,24 @@ inline std::ostream &operator<<(std::ostream &out, const ada::url &u);
49574996#include < cstring>
49584997
49594998/* *
4999+ * These functions are not part of our public API and may
5000+ * change at any time.
5001+ * @private
49605002 * @namespace ada::checkers
49615003 * @brief Includes the definitions for validation functions
49625004 */
49635005namespace ada ::checkers {
49645006
49655007/* *
5008+ * @private
49665009 * Assuming that x is an ASCII letter, this function returns the lower case
49675010 * equivalent.
49685011 * @details More likely to be inlined by the compiler and constexpr.
49695012 */
49705013constexpr char to_lower (char x) noexcept ;
49715014
49725015/* *
5016+ * @private
49735017 * Returns true if the character is an ASCII letter. Equivalent to std::isalpha
49745018 * but more likely to be inlined by the compiler.
49755019 *
@@ -4978,24 +5022,28 @@ constexpr char to_lower(char x) noexcept;
49785022constexpr bool is_alpha (char x) noexcept ;
49795023
49805024/* *
5025+ * @private
49815026 * Check whether a string starts with 0x or 0X. The function is only
49825027 * safe if input.size() >=2.
49835028 *
49845029 * @see has_hex_prefix
49855030 */
49865031inline bool has_hex_prefix_unsafe (std::string_view input);
49875032/* *
5033+ * @private
49885034 * Check whether a string starts with 0x or 0X.
49895035 */
49905036inline bool has_hex_prefix (std::string_view input);
49915037
49925038/* *
5039+ * @private
49935040 * Check whether x is an ASCII digit. More likely to be inlined than
49945041 * std::isdigit.
49955042 */
49965043constexpr bool is_digit (char x) noexcept ;
49975044
49985045/* *
5046+ * @private
49995047 * @details A string starts with a Windows drive letter if all of the following
50005048 * are true:
50015049 *
@@ -5009,26 +5057,30 @@ constexpr bool is_digit(char x) noexcept;
50095057inline constexpr bool is_windows_drive_letter (std::string_view input) noexcept ;
50105058
50115059/* *
5060+ * @private
50125061 * @details A normalized Windows drive letter is a Windows drive letter of which
50135062 * the second code point is U+003A (:).
50145063 */
50155064inline constexpr bool is_normalized_windows_drive_letter (
50165065 std::string_view input) noexcept ;
50175066
50185067/* *
5068+ * @private
50195069 * @warning Will be removed when Ada requires C++20.
50205070 */
50215071ada_really_inline bool begins_with (std::string_view view,
50225072 std::string_view prefix);
50235073
50245074/* *
5075+ * @private
50255076 * Returns true if an input is an ipv4 address. It is assumed that the string
50265077 * does not contain uppercase ASCII characters (the input should have been
50275078 * lowered cased before calling this function) and is not empty.
50285079 */
50295080ada_really_inline ada_constexpr bool is_ipv4 (std::string_view view) noexcept ;
50305081
50315082/* *
5083+ * @private
50325084 * Returns a bitset. If the first bit is set, then at least one character needs
50335085 * percent encoding. If the second bit is set, a \\ is found. If the third bit
50345086 * is set then we have a dot. If the fourth bit is set, then we have a percent
@@ -5038,6 +5090,7 @@ ada_really_inline constexpr uint8_t path_signature(
50385090 std::string_view input) noexcept ;
50395091
50405092/* *
5093+ * @private
50415094 * Returns true if the length of the domain name and its labels are according to
50425095 * the specifications. The length of the domain must be 255 octets (253
50435096 * characters not including the last 2 which are the empty label reserved at the
@@ -5751,6 +5804,10 @@ ada_really_inline size_t url::parse_port(std::string_view view,
57515804#include < algorithm>
57525805
57535806/* *
5807+ * Unicode operations. These functions are not part of our public API and may
5808+ * change at any time.
5809+ *
5810+ * private
57545811 * @namespace ada::unicode
57555812 * @brief Includes the declarations for unicode operations
57565813 */
@@ -7080,14 +7137,14 @@ url_search_params_entries_iter::next() {
70807137#ifndef ADA_ADA_VERSION_H
70817138#define ADA_ADA_VERSION_H
70827139
7083- #define ADA_VERSION " 2.7.6 "
7140+ #define ADA_VERSION " 2.7.7 "
70847141
70857142namespace ada {
70867143
70877144enum {
70887145 ADA_VERSION_MAJOR = 2 ,
70897146 ADA_VERSION_MINOR = 7 ,
7090- ADA_VERSION_REVISION = 6 ,
7147+ ADA_VERSION_REVISION = 7 ,
70917148};
70927149
70937150} // namespace ada
0 commit comments