Skip to content

Commit

Permalink
Add quote of Rust docs
Browse files Browse the repository at this point in the history
  • Loading branch information
webmaster128 committed Nov 29, 2023
1 parent 35c39f9 commit 8be414f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libwasmvm/src/vtables.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@
/// }
/// ```
///
/// Or to say it in the words of [the Rust documentation](https://doc.rust-lang.org/nomicon/ffi.html#the-nullable-pointer-optimization):
///
/// > So `Option<extern "C" fn(c_int) -> c_int>` is a correct way to represent a nullable function pointer using the C ABI (corresponding to the C type `int (*)(int))`.
///
/// Since all vtable fields are nullable, we can easily demand them
/// to have a Default implementation. This sometimes is handy when a
/// type is created in Rust and then filled in Go.
Expand Down

0 comments on commit 8be414f

Please sign in to comment.