-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NOTE: I had to disable the TLS tests because I shotdown the server I was running on my domain occase.de. Once this ticket is merged I will open a new one to fix that and reenable the tests.
- Loading branch information
Showing
4 changed files
with
16 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/* Copyright (c) 2018-2023 Marcelo Zimbres Silva ([email protected]) | ||
/* Copyright (c) 2018-2024 Marcelo Zimbres Silva ([email protected]) | ||
* | ||
* Distributed under the Boost Software License, Version 1.0. (See | ||
* accompanying file LICENSE.txt) | ||
|
@@ -13,7 +13,7 @@ | |
|
||
namespace boost::redis::resp3 { | ||
|
||
void to_int(int_type& i, std::string_view sv, system::error_code& ec) | ||
void to_int(std::size_t& i, std::string_view sv, system::error_code& ec) | ||
{ | ||
auto const res = std::from_chars(sv.data(), sv.data() + std::size(sv), i); | ||
if (res.ec != std::errc()) | ||
|
@@ -29,7 +29,7 @@ void parser::reset() | |
{ | ||
depth_ = 0; | ||
sizes_ = {{1}}; | ||
bulk_length_ = (std::numeric_limits<unsigned long>::max)(); | ||
bulk_length_ = (std::numeric_limits<std::size_t>::max)(); | ||
bulk_ = type::invalid; | ||
consumed_ = 0; | ||
sizes_[0] = 2; // The sentinel must be more than 1. | ||
|
@@ -189,7 +189,7 @@ parser::consume_impl( | |
case type::attribute: | ||
case type::map: | ||
{ | ||
int_type l = -1; | ||
std::size_t l = -1; | ||
to_int(l, elem, ec); | ||
if (ec) | ||
return {}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/* Copyright (c) 2018-2023 Marcelo Zimbres Silva ([email protected]) | ||
/* Copyright (c) 2018-2024 Marcelo Zimbres Silva ([email protected]) | ||
* | ||
* Distributed under the Boost Software License, Version 1.0. (See | ||
* accompanying file LICENSE.txt) | ||
|
@@ -16,8 +16,6 @@ | |
|
||
namespace boost::redis::resp3 { | ||
|
||
using int_type = std::uint64_t; | ||
|
||
class parser { | ||
public: | ||
using node_type = basic_node<std::string_view>; | ||
|
@@ -38,7 +36,7 @@ class parser { | |
std::array<std::size_t, max_embedded_depth + 1> sizes_; | ||
|
||
// Contains the length expected in the next bulk read. | ||
int_type bulk_length_; | ||
std::size_t bulk_length_; | ||
|
||
// The type of the next bulk. Contains type::invalid if no bulk is | ||
// expected. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters