I’m creating a C struct listener with a few callba...
# kotlin-native
d
I’m creating a C struct listener with a few callback functions and passing it to C code with
readValue()
, but it fails to access
walletManagerEventCallback
with
EXC_BAD_ACCESS (code=1, address=0x0)
. Should this work or am I missing something?
Copy code
internal fun cwmListener(
  c: BRCryptoCWMClientContext
) = nativeHeap.alloc<BRCryptoCWMListener> {
 context = c
 walletEventCallback = staticCFunction(::walletEventHandler)
 transferEventCallback = staticCFunction(::transferEventHandler)
 walletManagerEventCallback = staticCFunction(::walletManagerEventHandler)
}