about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAnton Lofgren <alofgren@op5.com>2014-07-04 20:09:28 +0200
committerAnton Lofgren <alofgren@op5.com>2014-07-04 20:09:28 +0200
commite737440bc6b793f98d5fb6883fc84dd3466fe5e5 (patch)
tree129d8a31060b444d97ecff3d517dd93434189423
parentc9e2ca0dfad8f2aff48c64887b1ec4276929eced (diff)
downloadrust-e737440bc6b793f98d5fb6883fc84dd3466fe5e5.tar.gz
rust-e737440bc6b793f98d5fb6883fc84dd3466fe5e5.zip
doc/guide-ffi: A few minor typo/language fixes
Signed-off-by: Anton Lofgren <alofgren@op5.com>
-rw-r--r--src/doc/guide-ffi.md14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/doc/guide-ffi.md b/src/doc/guide-ffi.md
index bba9594afeb..fb03d7bc11f 100644
--- a/src/doc/guide-ffi.md
+++ b/src/doc/guide-ffi.md
@@ -173,7 +173,7 @@ the same stack as the rust stack. This means that there is no extra
 stack-switching mechanism in place because it is assumed that the large stack
 for the rust task is plenty for the C function to have.
 
-A planned future improvement (net yet implemented at the time of this writing)
+A planned future improvement (not yet implemented at the time of this writing)
 is to have a guard page at the end of every rust stack. No rust function will
 hit this guard page (due to Rust's usage of LLVM's `__morestack`). The intention
 for this unmapped page is to prevent infinite recursion in C from overflowing
@@ -201,7 +201,7 @@ It is possible to pass functions defined in Rust to an external library.
 The requirement for this is that the callback function is marked as `extern`
 with the correct calling convention to make it callable from C code.
 
-The callback function that can then be sent to through a registration call
+The callback function can then be sent through a registration call
 to the C library and afterwards be invoked from there.
 
 A basic example is:
@@ -243,14 +243,14 @@ void trigger_callback() {
 }
 ~~~~
 
-In this example will Rust's `main()` will call `do_callback()` in C,
-which would call back to `callback()` in Rust.
+In this example Rust's `main()` will call `do_callback()` in C,
+which would, in turn, call back to `callback()` in Rust.
 
 
-## Targetting callbacks to Rust objects
+## Targeting callbacks to Rust objects
 
 The former example showed how a global function can be called from C code.
-However it is often desired that the callback is targetted to a special
+However it is often desired that the callback is targeted to a special
 Rust object. This could be the object that represents the wrapper for the
 respective C object.
 
@@ -334,7 +334,7 @@ it is also absolutely necessary that no more callbacks are performed by the
 C library after the respective Rust object gets destroyed.
 This can be achieved by unregistering the callback in the object's
 destructor and designing the library in a way that guarantees that no
-callback will be performed after unregistration.
+callback will be performed after deregistration.
 
 # Linking