Navigation Menu

Skip to content

Commit

Permalink
tutorial: rework nolink description to remove mention of "empty string"
Browse files Browse the repository at this point in the history
  • Loading branch information
gmfawcett authored and marijnh committed Jan 12, 2012
1 parent 9d217d9 commit f4a3a3b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions doc/tutorial/ffi.md
Expand Up @@ -196,9 +196,8 @@ microsecond-resolution timer.
ret (x.tv_sec as u64) * 1000_000_u64 + (x.tv_usec as u64);
}

The `#[nolink]` sets the name of the native module to the
empty string to prevent the rust compiler from trying to link it.
The standard C library is already linked with Rust programs.
The `#[nolink]` attribute indicates that there's no native library to link
in. The standard C library is already linked with Rust programs.

A `timeval`, in C, is a struct with two 32-bit integers. Thus, we
define a record type with the same contents, and declare
Expand Down

0 comments on commit f4a3a3b

Please sign in to comment.