mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-26 10:17:41 +00:00
chore(developer): enable build for emscripten 3.1.60+
Emscripten 3.1.60 made a breaking change to `BindingType::toWireType` (why is this done in a patch version?) so this change ensures that we can continue to build on 3.1.58 and 3.1.64 (which is needed for #12234), as a bridging strategy. We will need to merge this into 17.0-stable as well so that we can upgrade the build agents to 3.1.64. Relates-to: emscripten-core/emscripten#21692 Relates-to: #12234
This commit is contained in:
parent
f6c21874d7
commit
a0ebe130de
1 changed files with 7 additions and 0 deletions
|
|
@ -75,9 +75,16 @@ struct BindingType<std::vector<T, Allocator>> {
|
|||
using ValBinding = BindingType<val>;
|
||||
using WireType = ValBinding::WireType;
|
||||
|
||||
#if __EMSCRIPTEN_major__ == 3 && __EMSCRIPTEN_minor__ == 1 && __EMSCRIPTEN_tiny__ >= 60
|
||||
// emscripten-core/emscripten#21692
|
||||
static WireType toWireType(const std::vector<T, Allocator> &vec, rvp::default_tag) {
|
||||
return ValBinding::toWireType(val::array(vec), rvp::default_tag{});
|
||||
}
|
||||
#else
|
||||
static WireType toWireType(const std::vector<T, Allocator> &vec) {
|
||||
return ValBinding::toWireType(val::array(vec));
|
||||
}
|
||||
#endif
|
||||
|
||||
static std::vector<T, Allocator> fromWireType(WireType value) {
|
||||
return vecFromJSArray<T>(ValBinding::fromWireType(value));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue