From 53d2228b37c86ba671cf0029b90c0b349266bc5e Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Fri, 12 Apr 2013 06:31:54 -0400 Subject: [PATCH] tutorial-ffi: add another missing word --- doc/tutorial-ffi.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/tutorial-ffi.md b/doc/tutorial-ffi.md index fc62fafa700..61ecc209cac 100644 --- a/doc/tutorial-ffi.md +++ b/doc/tutorial-ffi.md @@ -186,10 +186,11 @@ A `#[packed]` attribute is available, which will lay out the struct members with However, there are currently no guarantees about the layout of an `enum`. Rust's owned and managed boxes use non-nullable pointers as handles which point to the contained -object. However, they should not be manually because they are managed by internal allocators. -Borrowed pointers can safely be assumed to be non-nullable pointers directly to the type. However, -breaking the borrow checking or mutability rules is not guaranteed to be safe, so prefer using raw -pointers (`*`) if that's needed because the compiler can't make as many assumptions about them. +object. However, they should not be manually created because they are managed by internal +allocators. Borrowed pointers can safely be assumed to be non-nullable pointers directly to the +type. However, breaking the borrow checking or mutability rules is not guaranteed to be safe, so +prefer using raw pointers (`*`) if that's needed because the compiler can't make as many assumptions +about them. Vectors and strings share the same basic memory layout, and utilities are available in the `vec` and `str` modules for working with C APIs. Strings are terminated with `\0` for interoperability with C,