Skip to content

Commit

Permalink
Make the header file C++ compatible.
Browse files Browse the repository at this point in the history
Sorry Jack.

Also throw in a pragma once for good measure.
  • Loading branch information
cjordan committed Feb 10, 2021
1 parent 86809a8 commit 7dab7f5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ fn main() {
match env::var("DOCS_RS").as_deref() {
Ok("1") => (),
_ => {
let mut config = cbindgen::Config::default();
config.cpp_compat = true;
config.pragma_once = true;
cbindgen::Builder::new()
.with_config(config)
.with_crate(crate_dir)
.with_language(cbindgen::Language::C)
.generate()
Expand Down

0 comments on commit 7dab7f5

Please sign in to comment.