Skip to content

Commit f484202

Browse files
committed
comment added
1 parent 9438d2b commit f484202

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

zenoh-flat-jni/build.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,16 @@ fn main() {
7777
// so it crosses as a raw byte-blob `ByteArray` rather than a closeable
7878
// jlong handle — this also lets `Vec<ZZenohId>` surface as
7979
// `List<ZZenohId>` (see z_session_peers_zid/routers_zid below).
80+
// ZZenohId is a `Copy` value (zenoh::session::ZenohId, repr(transparent)),
81+
// so it crosses as a raw byte-blob `ByteArray` rather than a closeable
82+
// jlong handle. `Vec<ZZenohId>` (z_session_peers_zid/routers_zid) folds
83+
// each element WHOLE as the typed `ZZenohId` value class (M4 Iterable,
84+
// no combined accessor). NOTE: the M5 vector-of-*unfolded* machinery
85+
// (decompose each element into e.g. `(String, ZZenohId)` via a combined
86+
// accessor with `.combined_accessor_record_id()` — a `value_blob`
87+
// identity delivered by copy) is implemented and unit-tested
88+
// (`iterable_decomposed_plan`); it's simply not wired here because the
89+
// SDK `ZenohId` stores the blob only and computes its string lazily.
8090
.value_blob(pq!(ZZenohId))
8191
.package_fun(pq!(z_zenoh_id_to_bytes))
8292
.package_fun(pq!(z_zenoh_id_to_string))

zenoh-flat-jni/generated-kotlin/io/zenoh/jni/session/JNIsession.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ public fun <A> zSessionPeersZid(session: ZSession, acc: A, fold: (A, ZZenohId) -
237237
val __ret = withSortedHandleLocks(session) {
238238
val session_ptr = session.ptr
239239
if (session_ptr == 0L) throw ZException("Operation on a closed native handle.")
240-
(JNINative.zSessionPeersZid(session_ptr, acc, { __a: A, __raw: ByteArray -> fold(__a, ZZenohId(__raw)) }, __sink) as A)
240+
(JNINative.zSessionPeersZid(session_ptr, acc, { __a: A, p0: ByteArray -> fold(__a, ZZenohId(p0)) }, __sink) as A)
241241
}
242242
__err.message?.let { throw ZException(it) }
243243
return __ret
@@ -250,7 +250,7 @@ public fun <A> zSessionRoutersZid(session: ZSession, acc: A, fold: (A, ZZenohId)
250250
val __ret = withSortedHandleLocks(session) {
251251
val session_ptr = session.ptr
252252
if (session_ptr == 0L) throw ZException("Operation on a closed native handle.")
253-
(JNINative.zSessionRoutersZid(session_ptr, acc, { __a: A, __raw: ByteArray -> fold(__a, ZZenohId(__raw)) }, __sink) as A)
253+
(JNINative.zSessionRoutersZid(session_ptr, acc, { __a: A, p0: ByteArray -> fold(__a, ZZenohId(p0)) }, __sink) as A)
254254
}
255255
__err.message?.let { throw ZException(it) }
256256
return __ret

0 commit comments

Comments
 (0)