Adapt to emsdk 3.1.46
...where it failed with
> In file included from static/source/unoembindhelpers/PrimaryBindings.cxx:13:
> In file included from ~/emsdk/upstream/emscripten/cache/sysroot/include/emscripten/bind.h:23:
> ~/emsdk/upstream/emscripten/cache/sysroot/include/emscripten/val.h:226:20: error: assigning to 'void *' from 'const void *' discards qualifiers
> 226 | cursor->w[0].p = wt;
> | ^~
> ~/emsdk/upstream/emscripten/cache/sysroot/include/emscripten/val.h:248:3: note: in instantiation of function template specialization 'emscripten::internal::writeGenericWireType<const void>' requested here
> 248 | writeGenericWireType(cursor, BindingType<First>::toWireType(std::forward<First>(first)));
> | ^
> ~/emsdk/upstream/emscripten/cache/sysroot/include/emscripten/val.h:256:5: note: in instantiation of function template specialization 'emscripten::internal::writeGenericWireTypes<const void *>' requested here
> 256 | writeGenericWireTypes(cursor, std::forward<Args>(args)...);
> | ^
> static/source/unoembindhelpers/PrimaryBindings.cxx:309:56: note: in instantiation of member function 'emscripten::internal::WireTypePack<const void *>::WireTypePack' requested here
> 309 | emscripten::internal::WireTypePack argv(self.getValue());
> | ^
see the comment at
<https://github.com/emscripten-core/emscripten/commit/0f83fd40533248cce42464e1b9b586281202f247#r139443236>
"[Wasm64] Fix embind with addresses over 4gb (#20071)"
Change-Id: I1f472e9dc57b3abfbe1ba8a0f3a3bd70c1c484f4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164463
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
diff --git a/static/source/unoembindhelpers/PrimaryBindings.cxx b/static/source/unoembindhelpers/PrimaryBindings.cxx
index 93ae895..51048dc 100644
--- a/static/source/unoembindhelpers/PrimaryBindings.cxx
+++ b/static/source/unoembindhelpers/PrimaryBindings.cxx
@@ -306,7 +306,7 @@ EMSCRIPTEN_BINDINGS(PrimaryBindings)
return emscripten::val(*o3tl::forceAccess<css::uno::Type>(self));
case css::uno::TypeClass_SEQUENCE:
{
emscripten::internal::WireTypePack argv(self.getValue());
emscripten::internal::WireTypePack argv(const_cast<void*>(self.getValue()));
return emscripten::val::take_ownership(
_emval_take_value(getTypeId(self.getValueType()), argv));
}