I'm updating a project that uses cinterop to work ...
# kotlin-native
s
I'm updating a project that uses cinterop to work with SqlCipher's generated sqlite3.h. It's been working fine for a long time. But now I'm updating to 1.9.22 (from 1.9.10) and newer releases of SqlCipher and OpenSSL. For some reason, there are two basic typedefs in sqlite3.h that errored as unresolved in the build, because I now evidently need explicit imports for them. I can't find doc on this so thought I'd ask here. sqlite3.h is quite large and defines the entire API for Sqlite and SqlCipher, so it's interesting to me that everything else in it still works fine with cinterop, just these two basic exceptions. These two lines pertinent are cherry-picked from sqlite3.h:
Copy code
typedef struct sqlite3 sqlite3

typedef struct sqlite3_stmt sqlite3_stmt
To access these from native, I now am required to explicitly include them this way to get a good build:
Copy code
import cnames.structs.sqlite3
import cnames.structs.sqlte3_stmt
Previously these imports were not required in a build using 1.9.10, but now they are on 1.9.22. On 1.9.10 and prior these two typedefs were importing just like everything else under the package name specified in the cinterops parms. So here's my question: is this explicit import of cnames.struct stuff expected to be required going forward? Or is it a symptom of some other problem I haven't hit yet, or a possible cinterop bug? Doc on cnames.structs seems to be really light. I found a [youtrack issue 49034](https://youtrack.jetbrains.com/issue/KT-49034) that shows cnames.struct has been around for a long time, and explains why it exists. But that issue is way before 1.9.x. I'm going forward assuming these explicit imports will be required. But thanks in advance to anyone that can point me at more doc or has other info on what's changed and when.
j
m