stainless-steel / sqlite3-sys

Bindings to SQLite
Other
19 stars 6 forks source link

API doesn't permit specifying transient destructors without potentially unsound coercions #9

Open udoprog opened 3 weeks ago

udoprog commented 3 weeks ago

See for example: sqlite3_result_blob.

In sqlite3 these supports special sentinel values which marks the value as transient, see: https://sqlite.org/c3ref/c_static.html.

This can only be done by coercing the sentinel value -1 into the Option<T> directly, which to my knowledge is not guaranteed to be correct.

IvanUkhov commented 2 weeks ago

Thank you for the note. I guess one has to look into how to customize bindgen to accommodate this.