Fix C defines to be mapped to signed integers

This fixes having to use "as i32" all over the place because Bindgen
erroneously thought that the defines should be interpreted as unsigned.
main
John Jekel 6 months ago
parent 68438c40f3
commit 0398d1994a
  1. 2
      Cargo.toml
  2. 1
      build.rs

@ -1,6 +1,6 @@
[package]
name = "sv-bindings"
version = "0.1.1"
version = "0.1.2"
description = "Raw FFI bindings for the (System)Verilog DPI, PLI, and VPI interfaces (IEEE 1800)."
authors = ["John Zacarias Jekel <john@jekel.ca>"]
readme = "README.md"

@ -93,6 +93,7 @@ fn setup_bindings(c_header: &str, rust_output: &str) {
let bindings = bindgen::Builder::default()
.header(c_header)
.parse_callbacks(Box::new(bindgen::CargoCallbacks::new()))
.default_macro_constant_type(bindgen::MacroTypeVariation::Signed)
.generate()
.expect("Unable to generate bindings");

Loading…
Cancel
Save