aboutsummaryrefslogtreecommitdiffstats
path: root/system/doc/tutorial/nif.xmlsrc
diff options
context:
space:
mode:
authorFredrik Gustafsson <[email protected]>2013-07-08 15:27:25 +0200
committerFredrik Gustafsson <[email protected]>2013-07-08 15:27:25 +0200
commit43159ab33e096504459235b78c734e9c4443336b (patch)
tree80c8b51cbdd8dbf27abab58983e26d11ab3e5084 /system/doc/tutorial/nif.xmlsrc
parent2aa252a12f88bcbb928cb1c958684eec6b427739 (diff)
parent56d2f22de3273075f95b020146bb1105decc87f5 (diff)
downloadotp-43159ab33e096504459235b78c734e9c4443336b.tar.gz
otp-43159ab33e096504459235b78c734e9c4443336b.tar.bz2
otp-43159ab33e096504459235b78c734e9c4443336b.zip
Merge branch 'maint'
Diffstat (limited to 'system/doc/tutorial/nif.xmlsrc')
-rw-r--r--system/doc/tutorial/nif.xmlsrc6
1 files changed, 3 insertions, 3 deletions
diff --git a/system/doc/tutorial/nif.xmlsrc b/system/doc/tutorial/nif.xmlsrc
index 81fd366016..8ddad60f74 100644
--- a/system/doc/tutorial/nif.xmlsrc
+++ b/system/doc/tutorial/nif.xmlsrc
@@ -29,7 +29,7 @@
<file>nif.xml</file>
</header>
<p>This is an example of how to solve the <seealso marker="example">example problem</seealso>
- by using NIFs. NIFs where introduced in R13B03 as an experimental
+ by using NIFs. NIFs were introduced in R13B03 as an experimental
feature. It is a simpler and more efficient way of calling C-code
than using port drivers. NIFs are most suitable for synchronous functions like
<c>foo</c> and <c>bar</c> in the example, that does some
@@ -85,7 +85,7 @@
<p>The function arguments passed to a NIF appears in an array <c>argv</c>,
with <c>argc</c> as the length of the array and thus the arity of the
function. The Nth argument of the function can be accessed as
- <c>argv[N-1]</c>. NIFs also takes an environment argument that
+ <c>argv[N-1]</c>. NIFs also take an environment argument that
serves as an opaque handle that is needed to be passed on to
most API functions. The environment contains information about
the calling Erlang process.</p>
@@ -98,7 +98,7 @@
structures containing name, arity and function pointer of
each NIF. The other arguments are pointers to callback functions
that can be used to initialize the library. We do not use them
- is this simple example so we set them all to <c>NULL</c>.</p>
+ in this simple example so we set them all to <c>NULL</c>.</p>
<p>Function arguments and return values are represented as values
of type <c>ERL_NIF_TERM</c>. We use functions like <c>enif_get_int</c>
and <c>enif_make_int</c> to convert between Erlang term and C-type.