Skip to content

Support f32/f64 in native function calls. #4642

@weiznich

Description

@weiznich

Currently this results in an error like that one:

error: unsupported operation: unsupported return type for native call: "sqlite3_value_double"
    --> /home/weiznich/Documents/rust/diesel/diesel/src/sqlite/connection/sqlite_value.rs:186:18
     |
 186 |         unsafe { ffi::sqlite3_value_double(self.value.as_ptr()) }
     |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unsupported operation occurred here
     |
     = help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support
     = note: BACKTRACE on thread `types::f32_from`:
     = note: inside `diesel::sqlite::SqliteValue::<'_, '_, '_>::read_double` at /home/weiznich/Documents/rust/diesel/diesel/src/sqlite/connection/sqlite_value.rs:186:18: 186:64

It would be nice to support floating point types there as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-nativeArea: calling native functions via FFIC-enhancementCategory: a PR with an enhancement or an issue tracking an accepted enhancementE-good-first-issueA good way to start contributing, mentoring is available

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions