You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
embind: Add workaround for unstable type-ids when requiring type
Due to TypeIDs not being stable between modules when the type info
is not visible outside the side-module, embind fails to look up
the registered type for a TypeID that has been registered from
another module.
This is for example the case for emscripten::val, which is registered
by embind.cpp. If another module uses the templated val(T&& value)
constructor, it will result in a call to _emval_take_value where
the passed type id is resolved in the context of the calling
module.
If these two differ, it will result in a binding error thrown:
BindingError: emval::as has unknown type N10emscripten3valE
As long as we can't guarantee stable type-ids across modules,
we work around the issue by looking for a matching existing
registered type based on the type name, and if one is found
we register the missing type-id with the same information.
Fixes: #16711
0 commit comments