Skip to content

Commit

Permalink
Merge pull request #1659 from ehuss/fix-stdcall
Browse files Browse the repository at this point in the history
Fix stdcall example broken by recent rustc change
  • Loading branch information
ehuss authored Oct 22, 2024
2 parents b2fd0f2 + 30a9afe commit 8676ab7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/items/external-blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ standard C ABI on the specific platform. Other ABIs may be specified using an
`abi` string, as shown here:

```rust
# #[cfg(any(windows, target_arch = "x86"))]
// Interface to the Windows API
unsafe extern "stdcall" { }
```
Expand Down Expand Up @@ -295,8 +296,8 @@ that symbol rather than having to look it up by name.
> [!WARNING]
> `link_ordinal` should only be used in cases where the ordinal of the symbol is known to be stable: if the ordinal of a symbol is not explicitly set when its containing binary is built then one will be automatically assigned to it, and that assigned ordinal may change between builds of the binary.
<!-- ignore: Only works on x86 Windows -->
```rust,ignore
```rust
# #[cfg(all(windows, target_arch = "x86"))]
#[link(name = "exporter", kind = "raw-dylib")]
unsafe extern "stdcall" {
#[link_ordinal(15)]
Expand Down

0 comments on commit 8676ab7

Please sign in to comment.