Skip to content

Commit 08b2a96

Browse files
authored
Update to Core 13.1.2 (#1164)
1 parent b870358 commit 08b2a96

File tree

7 files changed

+15
-7
lines changed

7 files changed

+15
-7
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ This release will bump the Realm file format from version 22 to 23. Opening a fi
3535

3636

3737
### Internal
38-
* Updated to Realm Core 13.0.0, commit f3d022476fb28eef41763a333730331e67decd00.
38+
* Updated to Realm Core 13.1.2, commit c03b10adcacec814c89158de8d4c06c2719af887.
3939
* Updated to require Swig 4.1.0.
4040
* `io.realm.kotlin.types.ObjectId` now delegates all responsibility to `org.mongodb.kbson.ObjectId` while maintaining the interface.
4141

packages/cinterop/src/androidAndroidTest/kotlin/io/realm/kotlin/test/CinteropTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class CinteropTest {
6262

6363
@Test
6464
fun version() {
65-
assertEquals("13.0.0", realmc.realm_get_library_version())
65+
assertEquals("13.1.2", realmc.realm_get_library_version())
6666
}
6767

6868
// Test various schema migration with automatic flag:

packages/cinterop/src/jvm/kotlin/io/realm/kotlin/internal/interop/RealmInterop.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,11 @@ actual object RealmInterop {
7373
}
7474

7575
actual fun realm_refresh(realm: RealmPointer) {
76-
realmc.realm_refresh(realm.cptr())
76+
// Only returns `true` if the version changed, `false` if the version
77+
// was already at the latest. Errors will be represented by the actual
78+
// return value, so just ignore this out parameter.
79+
val didRefresh = booleanArrayOf(false)
80+
realmc.realm_refresh(realm.cptr(), didRefresh)
7781
}
7882

7983
actual fun realm_schema_new(schema: List<Pair<ClassInfo, List<PropertyInfo>>>): RealmSchemaPointer {

packages/cinterop/src/nativeDarwin/kotlin/io/realm/kotlin/internal/interop/RealmInterop.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,11 @@ actual object RealmInterop {
277277

278278
actual fun realm_refresh(realm: RealmPointer) {
279279
memScoped {
280-
realm_wrapper.realm_refresh(realm.cptr())
280+
// Only returns `true` if the version changed, `false` if the version
281+
// was already at the latest. Errors will be represented by the actual
282+
// return value, so just ignore this out parameter.
283+
val didRefresh = alloc<BooleanVar>()
284+
checkedBooleanResult(realm_wrapper.realm_refresh(realm.cptr(), didRefresh.ptr))
281285
}
282286
}
283287

packages/cinterop/src/nativeDarwinTest/kotlin/io/realm/kotlin/test/CinteropTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ class CinteropTest {
9393

9494
@Test
9595
fun version() {
96-
assertEquals("13.0.0", realm_get_library_version()!!.toKString())
96+
assertEquals("13.1.2", realm_get_library_version()!!.toKString())
9797
}
9898

9999
@Test

packages/external/core

Submodule core updated 46 files

packages/jni-swig-stub/realm.i

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ bool realm_object_is_valid(const realm_object_t*);
310310

311311
// bool output parameter
312312
%apply bool* OUTPUT { bool* out_found, bool* did_create, bool* did_delete_realm, bool* out_inserted,
313-
bool* erased, bool* out_erased };
313+
bool* erased, bool* out_erased, bool* did_refresh };
314314

315315
// uint64_t output parameter for realm_get_num_versions
316316
%apply int64_t* OUTPUT { uint64_t* out_versions_count };

0 commit comments

Comments
 (0)