Add repr(transparent) to hyper_context#3498
Add repr(transparent) to hyper_context#3498Manishearth wants to merge 1 commit intohyperium:masterfrom
Conversation
|
Looks like cbindgen changes the header generation from |
293df63 to
e64d8da
Compare
|
No idea! |
|
|
e64d8da to
4efaa1a
Compare
|
Actually I'm not sure of |
3d73180 to
bd15e65
Compare
bd15e65 to
70fe4f6
Compare
|
Someone checked the ANSI C standard for me, repr(C) is fine |
|
@seanmonstar You should pick which one of transparent/packed/C you want here, all three are fine but I don't know enough about cbindgen's behavior. Ideally this would be configurable. |
|
We want two things:
cbindgen does not provide to force a type with a guaranteed layout to be opaque. We have a few options here:
1 is the most pragmatic, 2 should probably be done anyways (adding Context to std types) and 3 is probably the best long-term approach. If we want to go with 1, I can open a PR using my commit. |
hyper/src/ffi/task.rs
Line 504 in 1d4ff35
This comment is incorrect,
repr(Rust)provides no such guarantees.(Also we probably should make most of these FFI types
repr(C)))