mirror of
https://github.com/slint-ui/slint.git
synced 2025-09-30 22:01:13 +00:00
Test and fix C++ invokation of callback
This commit is contained in:
parent
d79131f18f
commit
bd6cace54c
3 changed files with 43 additions and 1 deletions
|
@ -422,7 +422,7 @@ public:
|
|||
using cbindgen_private::ValueOpaque;
|
||||
auto actual_cb = [](void *data, Slice<ValueOpaque> arg, ValueOpaque *ret) {
|
||||
Slice<Value> args_view { reinterpret_cast<Value *>(arg.ptr), arg.len };
|
||||
Value r = (*reinterpret_cast<F *>(data))(arg);
|
||||
Value r = (*reinterpret_cast<F *>(data))(args_view);
|
||||
new (ret) Value(std::move(r));
|
||||
};
|
||||
return cbindgen_private::sixtyfps_interpreter_component_instance_set_callback(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue