about summary refs log tree commit diff
path: root/doc/tutorial-ffi.md
diff options
context:
space:
mode:
authorTed Horst <ted.horst@earthlink.net>2013-05-23 15:06:29 -0500
committerTed Horst <ted.horst@earthlink.net>2013-05-23 15:06:29 -0500
commit34cfd2183b1d46ccec97691870a3bcceee5ee367 (patch)
tree4f2fc889423e27ba3956a42bf103d36e30582492 /doc/tutorial-ffi.md
parent6e2b082adc84c22ea3b023f4f08d7b21857fc399 (diff)
downloadrust-34cfd2183b1d46ccec97691870a3bcceee5ee367.tar.gz
rust-34cfd2183b1d46ccec97691870a3bcceee5ee367.zip
more testing fallout from core->std/std->extra move
Diffstat (limited to 'doc/tutorial-ffi.md')
-rw-r--r--doc/tutorial-ffi.md12
1 files changed, 6 insertions, 6 deletions
diff --git a/doc/tutorial-ffi.md b/doc/tutorial-ffi.md
index b2c2a8824ee..33a8cd230bb 100644
--- a/doc/tutorial-ffi.md
+++ b/doc/tutorial-ffi.md
@@ -12,7 +12,7 @@ The following is a minimal example of calling a foreign function which will comp
 installed:
 
 ~~~~ {.xfail-test}
-use core::libc::size_t;
+use std::libc::size_t;
 
 #[link_args = "-lsnappy"]
 extern {
@@ -42,7 +42,7 @@ runtime.
 The `extern` block can be extended to cover the entire snappy API:
 
 ~~~~ {.xfail-test}
-use core::libc::{c_int, size_t};
+use std::libc::{c_int, size_t};
 
 #[link_args = "-lsnappy"]
 extern {
@@ -149,9 +149,9 @@ A type with the same functionality as owned boxes can be implemented by
 wrapping `malloc` and `free`:
 
 ~~~~
-use core::libc::{c_void, size_t, malloc, free};
-use core::unstable::intrinsics;
-use core::util;
+use std::libc::{c_void, size_t, malloc, free};
+use std::unstable::intrinsics;
+use std::util;
 
 // a wrapper around the handle returned by the foreign code
 pub struct Unique<T> {
@@ -161,7 +161,7 @@ pub struct Unique<T> {
 pub impl<T: Owned> Unique<T> {
     fn new(value: T) -> Unique<T> {
         unsafe {
-            let ptr = malloc(core::sys::size_of::<T>() as size_t) as *mut T;
+            let ptr = malloc(std::sys::size_of::<T>() as size_t) as *mut T;
             assert!(!ptr::is_null(ptr));
             // `*ptr` is uninitialized, and `*ptr = value` would attempt to destroy it
             intrinsics::move_val_init(&mut *ptr, value);