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! */
2
2
/* begin file include/ada.h */
3
3
/* *
4
4
* @file ada.h
@@ -482,6 +482,9 @@ namespace ada {
482
482
#include < cstdint>
483
483
484
484
/* *
485
+ * These functions are not part of our public API and may
486
+ * change at any time.
487
+ * @private
485
488
* @namespace ada::character_sets
486
489
* @brief Includes the definitions for unicode character sets.
487
490
*/
@@ -492,6 +495,11 @@ ada_really_inline bool bit_at(const uint8_t a[], uint8_t i);
492
495
#endif // ADA_CHARACTER_SETS_H
493
496
/* end file include/ada/character_sets.h */
494
497
498
+ /* *
499
+ * These functions are not part of our public API and may
500
+ * change at any time.
501
+ * @private
502
+ */
495
503
namespace ada ::character_sets {
496
504
497
505
constexpr char hex[1024 ] =
@@ -936,7 +944,7 @@ constexpr uint8_t WWW_FORM_URLENCODED_PERCENT_ENCODE[32] = {
936
944
// 20 21 22 23 24 25 26 27
937
945
0x00 | 0x02 | 0x04 | 0x08 | 0x10 | 0x20 | 0x40 | 0x80 ,
938
946
// 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 ,
940
948
// 30 31 32 33 34 35 36 37
941
949
0x00 | 0x00 | 0x00 | 0x00 | 0x00 | 0x00 | 0x00 | 0x00 ,
942
950
// 38 39 3A 3B 3C 3D 3E 3F
@@ -1540,6 +1548,9 @@ struct url_base {
1540
1548
#include < optional>
1541
1549
1542
1550
/* *
1551
+ * These functions are not part of our public API and may
1552
+ * change at any time.
1553
+ *
1543
1554
* @private
1544
1555
* @namespace ada::helpers
1545
1556
* @brief Includes the definitions for helper functions
@@ -1702,6 +1713,7 @@ inline void inner_concat(std::string& buffer, T t, Args... args) {
1702
1713
}
1703
1714
1704
1715
/* *
1716
+ * @private
1705
1717
* Concatenate the arguments and return a string.
1706
1718
* @returns a string
1707
1719
*/
@@ -1713,6 +1725,7 @@ std::string concat(Args... args) {
1713
1725
}
1714
1726
1715
1727
/* *
1728
+ * @private
1716
1729
* @return Number of leading zeroes.
1717
1730
*/
1718
1731
inline int leading_zeroes (uint32_t input_num) noexcept {
@@ -1726,6 +1739,7 @@ inline int leading_zeroes(uint32_t input_num) noexcept {
1726
1739
}
1727
1740
1728
1741
/* *
1742
+ * @private
1729
1743
* Counts the number of decimal digits necessary to represent x.
1730
1744
* faster than std::to_string(x).size().
1731
1745
* @return digit count
@@ -4434,12 +4448,17 @@ std::string ipv4(uint64_t address) noexcept;
4434
4448
#include < optional>
4435
4449
4436
4450
/* *
4451
+ * Unicode operations. These functions are not part of our public API and may
4452
+ * change at any time.
4453
+ *
4454
+ * @private
4437
4455
* @namespace ada::unicode
4438
4456
* @brief Includes the definitions for unicode operations
4439
4457
*/
4440
4458
namespace ada ::unicode {
4441
4459
4442
4460
/* *
4461
+ * @private
4443
4462
* We receive a UTF-8 string representing a domain name.
4444
4463
* If the string is percent encoded, we apply percent decoding.
4445
4464
*
@@ -4483,11 +4502,13 @@ bool to_ascii(std::optional<std::string>& out, std::string_view plain,
4483
4502
size_t first_percent);
4484
4503
4485
4504
/* *
4505
+ * @private
4486
4506
* @see https://www.unicode.org/reports/tr46/#ToUnicode
4487
4507
*/
4488
4508
std::string to_unicode (std::string_view input);
4489
4509
4490
4510
/* *
4511
+ * @private
4491
4512
* Checks if the input has tab or newline characters.
4492
4513
*
4493
4514
* @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(
4497
4518
std::string_view user_input) noexcept ;
4498
4519
4499
4520
/* *
4521
+ * @private
4500
4522
* Checks if the input is a forbidden host code point.
4501
4523
* @see https://url.spec.whatwg.org/#forbidden-host-code-point
4502
4524
*/
4503
4525
ada_really_inline constexpr bool is_forbidden_host_code_point (char c) noexcept ;
4504
4526
4505
4527
/* *
4528
+ * @private
4506
4529
* Checks if the input contains a forbidden domain code point.
4507
4530
* @see https://url.spec.whatwg.org/#forbidden-domain-code-point
4508
4531
*/
4509
4532
ada_really_inline constexpr bool contains_forbidden_domain_code_point (
4510
4533
const char * input, size_t length) noexcept ;
4511
4534
4512
4535
/* *
4536
+ * @private
4513
4537
* Checks if the input contains a forbidden domain code point in which case
4514
4538
* the first bit is set to 1. If the input contains an upper case ASCII letter,
4515
4539
* then the second bit is set to 1.
@@ -4520,18 +4544,21 @@ contains_forbidden_domain_code_point_or_upper(const char* input,
4520
4544
size_t length) noexcept ;
4521
4545
4522
4546
/* *
4547
+ * @private
4523
4548
* Checks if the input is a forbidden domain code point.
4524
4549
* @see https://url.spec.whatwg.org/#forbidden-domain-code-point
4525
4550
*/
4526
4551
ada_really_inline constexpr bool is_forbidden_domain_code_point (
4527
4552
char c) noexcept ;
4528
4553
4529
4554
/* *
4555
+ * @private
4530
4556
* Checks if the input is alphanumeric, '+', '-' or '.'
4531
4557
*/
4532
4558
ada_really_inline constexpr bool is_alnum_plus (char c) noexcept ;
4533
4559
4534
4560
/* *
4561
+ * @private
4535
4562
* @details An ASCII hex digit is an ASCII upper hex digit or ASCII lower hex
4536
4563
* digit. An ASCII upper hex digit is an ASCII digit or a code point in the
4537
4564
* 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;
4540
4567
ada_really_inline constexpr bool is_ascii_hex_digit (char c) noexcept ;
4541
4568
4542
4569
/* *
4570
+ * @private
4543
4571
* Checks if the input is a C0 control or space character.
4544
4572
*
4545
4573
* @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;
4549
4577
ada_really_inline constexpr bool is_c0_control_or_space (char c) noexcept ;
4550
4578
4551
4579
/* *
4580
+ * @private
4552
4581
* Checks if the input is a ASCII tab or newline character.
4553
4582
*
4554
4583
* @details An ASCII tab or newline is U+0009 TAB, U+000A LF, or U+000D CR.
4555
4584
*/
4556
4585
ada_really_inline constexpr bool is_ascii_tab_or_newline (char c) noexcept ;
4557
4586
4558
4587
/* *
4588
+ * @private
4559
4589
* @details A double-dot path segment must be ".." or an ASCII case-insensitive
4560
4590
* match for ".%2e", "%2e.", or "%2e%2e".
4561
4591
*/
4562
4592
ada_really_inline ada_constexpr bool is_double_dot_path_segment (
4563
4593
std::string_view input) noexcept ;
4564
4594
4565
4595
/* *
4596
+ * @private
4566
4597
* @details A single-dot path segment must be "." or an ASCII case-insensitive
4567
4598
* match for "%2e".
4568
4599
*/
4569
4600
ada_really_inline constexpr bool is_single_dot_path_segment (
4570
4601
std::string_view input) noexcept ;
4571
4602
4572
4603
/* *
4604
+ * @private
4573
4605
* @details ipv4 character might contain 0-9 or a-f character ranges.
4574
4606
*/
4575
4607
ada_really_inline constexpr bool is_lowercase_hex (char c) noexcept ;
4576
4608
4577
4609
/* *
4610
+ * @private
4578
4611
* @details Convert hex to binary. Caller is responsible to ensure that
4579
4612
* the parameter is an hexadecimal digit (0-9, A-F, a-f).
4580
4613
*/
4581
4614
ada_really_inline unsigned constexpr convert_hex_to_binary (char c) noexcept ;
4582
4615
4583
4616
/* *
4617
+ * @private
4584
4618
* first_percent should be = input.find('%')
4585
4619
*
4586
4620
* @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;
4591
4625
std::string percent_decode (std::string_view input, size_t first_percent);
4592
4626
4593
4627
/* *
4628
+ * @private
4594
4629
* Returns a percent-encoding string whether percent encoding was needed or not.
4595
4630
* @see https://github.com/nodejs/node/blob/main/src/node_url.cc#L226
4596
4631
*/
4597
4632
std::string percent_encode (std::string_view input,
4598
4633
const uint8_t character_set[]);
4599
4634
/* *
4635
+ * @private
4600
4636
* Returns a percent-encoded string version of input, while starting the percent
4601
4637
* encoding at the provided index.
4602
4638
* @see https://github.com/nodejs/node/blob/main/src/node_url.cc#L226
4603
4639
*/
4604
4640
std::string percent_encode (std::string_view input,
4605
4641
const uint8_t character_set[], size_t index);
4606
4642
/* *
4643
+ * @private
4607
4644
* Returns true if percent encoding was needed, in which case, we store
4608
4645
* the percent-encoded content in 'out'. If the boolean 'append' is set to
4609
4646
* true, the content is appended to 'out'.
@@ -4614,12 +4651,14 @@ template <bool append>
4614
4651
bool percent_encode (std::string_view input, const uint8_t character_set[],
4615
4652
std::string& out);
4616
4653
/* *
4654
+ * @private
4617
4655
* Returns the index at which percent encoding should start, or (equivalently),
4618
4656
* the length of the prefix that does not require percent encoding.
4619
4657
*/
4620
4658
ada_really_inline size_t percent_encode_index (std::string_view input,
4621
4659
const uint8_t character_set[]);
4622
4660
/* *
4661
+ * @private
4623
4662
* Lowers the string in-place, assuming that the content is ASCII.
4624
4663
* Return true if the content was ASCII.
4625
4664
*/
@@ -4957,19 +4996,24 @@ inline std::ostream &operator<<(std::ostream &out, const ada::url &u);
4957
4996
#include < cstring>
4958
4997
4959
4998
/* *
4999
+ * These functions are not part of our public API and may
5000
+ * change at any time.
5001
+ * @private
4960
5002
* @namespace ada::checkers
4961
5003
* @brief Includes the definitions for validation functions
4962
5004
*/
4963
5005
namespace ada ::checkers {
4964
5006
4965
5007
/* *
5008
+ * @private
4966
5009
* Assuming that x is an ASCII letter, this function returns the lower case
4967
5010
* equivalent.
4968
5011
* @details More likely to be inlined by the compiler and constexpr.
4969
5012
*/
4970
5013
constexpr char to_lower (char x) noexcept ;
4971
5014
4972
5015
/* *
5016
+ * @private
4973
5017
* Returns true if the character is an ASCII letter. Equivalent to std::isalpha
4974
5018
* but more likely to be inlined by the compiler.
4975
5019
*
@@ -4978,24 +5022,28 @@ constexpr char to_lower(char x) noexcept;
4978
5022
constexpr bool is_alpha (char x) noexcept ;
4979
5023
4980
5024
/* *
5025
+ * @private
4981
5026
* Check whether a string starts with 0x or 0X. The function is only
4982
5027
* safe if input.size() >=2.
4983
5028
*
4984
5029
* @see has_hex_prefix
4985
5030
*/
4986
5031
inline bool has_hex_prefix_unsafe (std::string_view input);
4987
5032
/* *
5033
+ * @private
4988
5034
* Check whether a string starts with 0x or 0X.
4989
5035
*/
4990
5036
inline bool has_hex_prefix (std::string_view input);
4991
5037
4992
5038
/* *
5039
+ * @private
4993
5040
* Check whether x is an ASCII digit. More likely to be inlined than
4994
5041
* std::isdigit.
4995
5042
*/
4996
5043
constexpr bool is_digit (char x) noexcept ;
4997
5044
4998
5045
/* *
5046
+ * @private
4999
5047
* @details A string starts with a Windows drive letter if all of the following
5000
5048
* are true:
5001
5049
*
@@ -5009,26 +5057,30 @@ constexpr bool is_digit(char x) noexcept;
5009
5057
inline constexpr bool is_windows_drive_letter (std::string_view input) noexcept ;
5010
5058
5011
5059
/* *
5060
+ * @private
5012
5061
* @details A normalized Windows drive letter is a Windows drive letter of which
5013
5062
* the second code point is U+003A (:).
5014
5063
*/
5015
5064
inline constexpr bool is_normalized_windows_drive_letter (
5016
5065
std::string_view input) noexcept ;
5017
5066
5018
5067
/* *
5068
+ * @private
5019
5069
* @warning Will be removed when Ada requires C++20.
5020
5070
*/
5021
5071
ada_really_inline bool begins_with (std::string_view view,
5022
5072
std::string_view prefix);
5023
5073
5024
5074
/* *
5075
+ * @private
5025
5076
* Returns true if an input is an ipv4 address. It is assumed that the string
5026
5077
* does not contain uppercase ASCII characters (the input should have been
5027
5078
* lowered cased before calling this function) and is not empty.
5028
5079
*/
5029
5080
ada_really_inline ada_constexpr bool is_ipv4 (std::string_view view) noexcept ;
5030
5081
5031
5082
/* *
5083
+ * @private
5032
5084
* Returns a bitset. If the first bit is set, then at least one character needs
5033
5085
* percent encoding. If the second bit is set, a \\ is found. If the third bit
5034
5086
* 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(
5038
5090
std::string_view input) noexcept ;
5039
5091
5040
5092
/* *
5093
+ * @private
5041
5094
* Returns true if the length of the domain name and its labels are according to
5042
5095
* the specifications. The length of the domain must be 255 octets (253
5043
5096
* 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,
5751
5804
#include < algorithm>
5752
5805
5753
5806
/* *
5807
+ * Unicode operations. These functions are not part of our public API and may
5808
+ * change at any time.
5809
+ *
5810
+ * private
5754
5811
* @namespace ada::unicode
5755
5812
* @brief Includes the declarations for unicode operations
5756
5813
*/
@@ -7080,14 +7137,14 @@ url_search_params_entries_iter::next() {
7080
7137
#ifndef ADA_ADA_VERSION_H
7081
7138
#define ADA_ADA_VERSION_H
7082
7139
7083
- #define ADA_VERSION " 2.7.6 "
7140
+ #define ADA_VERSION " 2.7.7 "
7084
7141
7085
7142
namespace ada {
7086
7143
7087
7144
enum {
7088
7145
ADA_VERSION_MAJOR = 2 ,
7089
7146
ADA_VERSION_MINOR = 7 ,
7090
- ADA_VERSION_REVISION = 6 ,
7147
+ ADA_VERSION_REVISION = 7 ,
7091
7148
};
7092
7149
7093
7150
} // namespace ada
0 commit comments