Uh oh!
There was an error while loading. Please reload this page.
Add an example to the FFI guide - #19968
Closed
steveklabnik wants to merge 1 commit into
Closed
Conversation
Member
There was a problem hiding this comment.
I personally prefer to drop the "C" wherever possible as it's the default.
ContributorAuthor
There was a problem hiding this comment.
Oh interesting. @aturon do we have any convention here?
ContributorAuthor
There was a problem hiding this comment.
@aturon says no official one, but:
steve@warmachine:~/src/rust$ git grep 'extern {'| wc -l
253
steve@warmachine:~/src/rust$ git grep 'extern "C" {'| wc -l
25So, seems legit. :)
emberian
commented
Jan 5, 2015
Contributor
@steveklabnik ping |
steveklabnik
commented
Jan 16, 2015
ContributorAuthor
This has now been updated to be on the book, and I fixed the style issue. @alexcrichton r? |
steveklabnik
commented
Jan 16, 2015
ContributorAuthor
@alexcrichton both nits fixed |
bors added a commit
that referenced
this pull request
Jan 17, 2015
Add an example to the FFI guide Reviewed-by: alexcrichton
bors referenced
this pull request
Jan 17, 2015
bors added a commit
that referenced
this pull request
Jan 17, 2015
Add an example to the FFI guide Reviewed-by: alexcrichton
steveklabnik
commented
Jan 17, 2015
ContributorAuthor
Doing this manually as part of #21300 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a little short, but the FFI guide needs a cohesive go-over, and this at least adds the information in the meantime.
It also modernizes the style in a small way, by moving the tilde syntax to the grave syntax.