Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skipped functions: not both no_mangle and extern "C" #49

Closed
dbrgn opened this issue Sep 3, 2017 · 2 comments
Closed

Skipped functions: not both no_mangle and extern "C" #49

dbrgn opened this issue Sep 3, 2017 · 2 comments
Labels

Comments

@dbrgn
Copy link
Contributor

dbrgn commented Sep 3, 2017

When trying to generate header files for an FFI crate I get these warnings:

WARN: skip ::svg_str_to_polylines - (not both no_mangle and extern "C")
WARN: skip ::free_polylines - (not both no_mangle and extern "C")

The warnings are correct, I use #[no_mangle] for the functions but not "C":

#[no_mangle]
pub extern fn svg_str_to_polylines(...

According to https://stackoverflow.com/a/44664851/284318 there is not a real need for the "C" part, and the version without seems preferred: rust-lang/style-team#52

Is there a reason why cbindgen requires that part of the declaration?

@eqrion
Copy link
Collaborator

eqrion commented Sep 5, 2017

Ah, I wasn't aware that the C ABI is the default with extern. cbindgen should accept it without "C" then.

@eqrion
Copy link
Collaborator

eqrion commented Sep 27, 2017

This should be fixed in e0ec983.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants