File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -165,12 +165,12 @@ let _ = close(Door::<Closed>(~"front")); // error: mismatched types: expected `m
165165
166166## C function signature conversions
167167
168- Description | C signature | Equivalent Rust signature
169- ----------------------| ----------------------------------------------| ------------------------------------------
170- no parameters | ` void foo(void); ` | ` fn foo(); `
171- return value | ` int foo(void); ` | ` fn foo() -> c_int; `
172- function parameters | ` void foo(int x, int y); ` | ` fn foo(x: int, y: int); `
173- in-out pointers | ` void foo(const int* in_ptr, int* out_ptr); ` | ` fn foo(in_ptr: *c_int, out_ptr: *mut c_int); `
168+ Description C signature Equivalent Rust signature
169+ ---------------------- ---------------------------------------------- ------------------------------------------
170+ no parameters ` void foo(void); ` ` fn foo(); `
171+ return value ` int foo(void); ` ` fn foo() -> c_int; `
172+ function parameters ` void foo(int x, int y); ` ` fn foo(x: int, y: int); `
173+ in-out pointers ` void foo(const int* in_ptr, int* out_ptr); ` ` fn foo(in_ptr: *c_int, out_ptr: *mut c_int); `
174174
175175Note: The Rust signatures should be wrapped in an ` extern "ABI" { ... } ` block.
176176
You can’t perform that action at this time.
0 commit comments