PJ_object_bytes_handle_t is a heap-allocated sdk::PayloadView: its anchor keeps the buffer alive until the plugin calls release_bytes. No wrapper struct needed — PayloadView already carries the Span + anchor.
| 1743 | // keeps the buffer alive until the plugin calls release_bytes. No wrapper |
| 1744 | // struct needed — PayloadView already carries the Span + anchor. |
| 1745 | PJ_object_topic_handle_t toolboxObjectLookupTopic(void* ctx, PJ_string_view_t topic_name) noexcept { |
| 1746 | auto* impl = static_cast<DatastoreToolboxObjectReadHostState*>(ctx); |
| 1747 | try { |
| 1748 | const auto needle = toStringView(topic_name); |
| 1749 | for (const auto id : impl->store.listTopics()) { |
| 1750 | if (impl->store.descriptor(id).topic_name == needle) { |
| 1751 | return PJ_object_topic_handle_t{id.id}; |
| 1752 | } |
| 1753 | } |
| 1754 | } catch (...) { |
| 1755 | // Fall through to invalid handle. |
| 1756 | } |
| 1757 | return PJ_object_topic_handle_t{0}; |
| 1758 | } |
| 1759 | |
| 1760 | bool toolboxObjectListTopics( |
| 1761 | void* ctx, PJ_object_topic_handle_t* out_buffer, uint64_t buffer_capacity, uint64_t* out_count, |
nothing calls this directly
no test coverage detected