Skip to content

Commit

Permalink
Run GitHub Actions on macOS with GCC 13 (#818)
Browse files Browse the repository at this point in the history
Signed-off-by: Juan Cruz Viotti <[email protected]>
  • Loading branch information
jviotti authored Sep 27, 2024
1 parent 7b14bda commit ad5ed57
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 11 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ jobs:
cc: clang
cxx: clang++
type: shared
- os: macos-latest
cc: gcc-13
cxx: g++-13
type: static
- os: ubuntu-latest
cc: clang
cxx: clang++
Expand Down
1 change: 1 addition & 0 deletions Brewfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
brew "cmake"
brew "sassc"
brew "gcc@13"
25 changes: 14 additions & 11 deletions src/runtime/include/sourcemeta/jsonbinpack/runtime_decoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,9 @@ class Decoder : private BasicDecoder<CharT, Traits> {
if (is_shared) {
const std::uint64_t position{this->position()};
const std::uint64_t current{this->rewind(this->get_varint(), position)};
sourcemeta::jsontoolkit::JSON string{this->get_string_utf8(length)};
const sourcemeta::jsontoolkit::JSON value{this->get_string_utf8(length)};
this->seek(current);
return string;
return value;
} else {
return UTF8_STRING_NO_LENGTH({length});
}
Expand All @@ -229,9 +229,10 @@ class Decoder : private BasicDecoder<CharT, Traits> {
if (is_shared) {
const std::uint64_t position{this->position()};
const std::uint64_t current{this->rewind(this->get_varint(), position)};
sourcemeta::jsontoolkit::JSON string = UTF8_STRING_NO_LENGTH({length});
const sourcemeta::jsontoolkit::JSON value{
UTF8_STRING_NO_LENGTH({length})};
this->seek(current);
return string;
return value;
} else {
return UTF8_STRING_NO_LENGTH({length});
}
Expand All @@ -251,9 +252,10 @@ class Decoder : private BasicDecoder<CharT, Traits> {
if (is_shared) {
const std::uint64_t position{this->position()};
const std::uint64_t current{this->rewind(this->get_varint(), position)};
sourcemeta::jsontoolkit::JSON string = UTF8_STRING_NO_LENGTH({length});
const sourcemeta::jsontoolkit::JSON value{
UTF8_STRING_NO_LENGTH({length})};
this->seek(current);
return string;
return value;
} else {
return UTF8_STRING_NO_LENGTH({length});
}
Expand Down Expand Up @@ -289,10 +291,10 @@ class Decoder : private BasicDecoder<CharT, Traits> {
if (prefix == 0) {
const std::uint64_t position{this->position()};
const std::uint64_t current{this->rewind(this->get_varint(), position)};
sourcemeta::jsontoolkit::JSON string =
PREFIX_VARINT_LENGTH_STRING_SHARED(options);
const sourcemeta::jsontoolkit::JSON value{
PREFIX_VARINT_LENGTH_STRING_SHARED(options)};
this->seek(current);
return string;
return value;
} else {
return sourcemeta::jsontoolkit::JSON{this->get_string_utf8(prefix - 1)};
}
Expand Down Expand Up @@ -438,9 +440,10 @@ class Decoder : private BasicDecoder<CharT, Traits> {
const std::uint64_t position{this->position()};
const std::uint64_t current{
this->rewind(this->get_varint(), position)};
sourcemeta::jsontoolkit::JSON string{this->get_string_utf8(length)};
const sourcemeta::jsontoolkit::JSON value{
this->get_string_utf8(length)};
this->seek(current);
return string;
return value;
};
case TYPE_STRING:
return subtype == 0 ? this->FLOOR_VARINT_PREFIX_UTF8_STRING_SHARED(
Expand Down

0 comments on commit ad5ed57

Please sign in to comment.