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

rewrite the ffi tutorial with snappy as an example #5849

Closed
wants to merge 1 commit into from
Closed

rewrite the ffi tutorial with snappy as an example #5849

wants to merge 1 commit into from

Conversation

thestinger
Copy link
Contributor

The code samples are xfail'ed because the buildbot won't have libsnappy.so and I don't want to add boilerplate to all the snippets (but they're directly from my snappy bindings so I'll just send a pull request whenever they break). It works really well as an example because it's tiny library and lets the caller manage all the buffers.

I think everything stated in the Interoperability with foreign code section is accurate but it deserves a thorough double-check :).

@brson
Copy link
Contributor

brson commented Apr 12, 2013

Thanks for rewriting this! It's a lot better than the previous version.

I commented on an outdated revision. Please give them some consideration.

The example with OpenSSL is incorrect, because OpenSSL is using a
static variable for the return value and isn't thread-safe.

The gettimeofday example isn't great because it's not very portable.
bors added a commit that referenced this pull request Apr 12, 2013
The code samples are xfail'ed because the buildbot won't have `libsnappy.so` and I don't want to add boilerplate to all the snippets (but they're directly from my snappy bindings so I'll just send a pull request whenever they break). It works really well as an example because it's tiny library and lets the caller manage all the buffers.

I think everything stated in the `Interoperability with foreign code` section is accurate but it deserves a thorough double-check :).
@bors bors closed this Apr 12, 2013
flip1995 pushed a commit to flip1995/rust that referenced this pull request Nov 3, 2020
No lint in macro for `toplevel_ref_arg`

Do not lint when the span is from a macro.

Question: shouldn't we extend this for external macros also ?

Fixes: rust-lang#5849

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

Successfully merging this pull request may close these issues.

3 participants