Skip to content
This repository was archived by the owner on Nov 5, 2024. It is now read-only.

Commit ca2018b

Browse files
committed
update to cpp bindings v3.0.0-3.7
1 parent cb7933f commit ca2018b

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ ifeq ($(UNAME_S), Darwin)
2929
NODE_FILE_NAME = darwin.node
3030
endif
3131

32-
VERSION = 3.0.0-3.6
32+
VERSION = 3.0.0-3.7
3333

3434
ifndef BUILD_ENV
3535
BUILD_ENV = debug

build-convert/gen/message_cc.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ namespace lib_ruby_parser_node {{
3232
return std::visit([env](auto &&variant) -> Napi::Value {{
3333
using T = std::decay_t<decltype(variant)>;
3434
{comparisons}
35+
36+
// Technically impossible
37+
return env.Null();
3538
}}, diagnostic_message->variant);
3639
}}
3740

src/custom_decoder.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ namespace lib_ruby_parser_node
2525
return this->callback.Env();
2626
}
2727

28-
virtual Result rewrite(std::string encoding, lib_ruby_parser::Bytes input)
28+
Result rewrite(const std::string &encoding, const lib_ruby_parser::Bytes &input) override
2929
{
3030
Napi::Value response = this->callback.Call({
3131
Napi::String::New(env(), encoding),
32-
convert(std::move(input), env()),
32+
convert(input.clone(), env()),
3333
});
3434

3535
if (response.IsString())

0 commit comments

Comments
 (0)