Skip to content

Commit

Permalink
Fix type mismatch between Regex class and underlying API
Browse files Browse the repository at this point in the history
  • Loading branch information
i-ky committed Jun 27, 2024
1 parent 0e0bc1a commit c94d310
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/basset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ class Regex {
[[nodiscard]] bool match(const string &text) const;

private:
[[noreturn]] void report(ssize_t errcode) const;
[[noreturn]] void report(int errcode) const;
regex_t preg;
};

Expand All @@ -182,7 +182,7 @@ bool Regex::match(const string &text) const {
}
}

void Regex::report(ssize_t errcode) const {
void Regex::report(int errcode) const {
auto size = regerror(errcode, &preg, nullptr, 0);
auto errbuf = make_unique<char>(size);
regerror(errcode, &preg, errbuf.get(), size);
Expand Down

0 comments on commit c94d310

Please sign in to comment.