The Kotlin Native mapping for the Paho MQTT Client...
# kotlin-native
n
The Kotlin Native mapping for the Paho MQTT Client library isn't aligned correctly. Take for example the MQTTClient_create function ( https://www.eclipse.org/paho/files/mqttdoc/MQTTClient/html/_m_q_t_t_client_8h.html#a9a0518d9ca924d12c1329dbe3de5f2b6 ) which takes four arguments. One of the arguments is handle which is a pointer to MQTTClient ( https://www.eclipse.org/paho/files/mqttdoc/MQTTClient/html/_m_q_t_t_client_8h.html#a7649e3913f9a216424d296f88a969c59 ). In the mapping the handle argument uses the CValuesRef<MQTTClientVar>? instead of CPointer<MQTTClient>?. Below is the MQTTClient_create function mapping:
public fun MQTTClient_create(handle: kotlinx.cinterop.CValuesRef<paho_mqtt.MQTTClientVar /* = kotlinx.cinterop.CPointerVarOf<paho_mqtt.MQTTClient /* = kotlinx.cinterop.CPointer<out kotlinx.cinterop.CPointed> */> */>?, @kotlinx.cinterop.internal.CCall.CString serverURI: kotlin.String?, @kotlinx.cinterop.internal.CCall.CString clientId: kotlin.String?, persistence_type: <http://kotlin.Int|kotlin.Int>, persistence_context: kotlinx.cinterop.CValuesRef<*>?): <http://kotlin.Int|kotlin.Int> { /* compiled code */ }
Would be much easier to read the mappings if the comments were stripped out.
s
238 Views