From 3ae72f579b5c24aa25794acd4431f9594f63d061 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Overg=C3=A5rd=20Nielsen?= Date: Mon, 16 May 2022 14:55:14 +0200 Subject: [PATCH] Update realm-core to v11.16.0 --- lib/src/native/realm_bindings.dart | 21 +++++++++++++++++++++ src/realm-core | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/lib/src/native/realm_bindings.dart b/lib/src/native/realm_bindings.dart index 2d4defecb..6e70c8257 100644 --- a/lib/src/native/realm_bindings.dart +++ b/lib/src/native/realm_bindings.dart @@ -8484,6 +8484,25 @@ class RealmLibrary { ffi.Pointer, realm_free_userdata_func_t)>(); + /// In case of exception thrown in user code callbacks, this api will allow the sdk to store the user code exception + /// and retrieve a it later via realm_get_last_error. + /// Most importantly the SDK is responsible to handle the memory pointed by usercode_error. + /// @param usercode_error pointer representing whatever object the SDK treats as exception/error. + void realm_register_user_code_callback_error( + ffi.Pointer usercode_error, + ) { + return _realm_register_user_code_callback_error( + usercode_error, + ); + } + + late final _realm_register_user_code_callback_errorPtr = + _lookup)>>( + 'realm_register_user_code_callback_error'); + late final _realm_register_user_code_callback_error = + _realm_register_user_code_callback_errorPtr + .asFunction)>(); + void realm_initializeDartApiDL( ffi.Pointer data, ) { @@ -8955,6 +8974,8 @@ class realm_error extends ffi.Struct { external ffi.Pointer message; + external ffi.Pointer usercode_error; + external UnnamedUnion2 kind; } diff --git a/src/realm-core b/src/realm-core index 8c2ad6fc8..c220e3ca5 160000 --- a/src/realm-core +++ b/src/realm-core @@ -1 +1 @@ -Subproject commit 8c2ad6fc800417784acbe238d41b8409ee3fe991 +Subproject commit c220e3ca59032024d641f8e3b0243064f90ff068