From e2e265e22c472ad074f939d5818d0c8113c12910 Mon Sep 17 00:00:00 2001 From: Yoshihiro Tanaka Date: Sun, 7 Jul 2013 07:36:32 -0700 Subject: Fix Nif doc typos --- system/doc/tutorial/nif.xmlsrc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'system') diff --git a/system/doc/tutorial/nif.xmlsrc b/system/doc/tutorial/nif.xmlsrc index 6cb54ff7ff..79cef31160 100644 --- a/system/doc/tutorial/nif.xmlsrc +++ b/system/doc/tutorial/nif.xmlsrc @@ -29,7 +29,7 @@ nif.xml

This is an example of how to solve the example problem - 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 foo and bar in the example, that does some @@ -85,7 +85,7 @@

The function arguments passed to a NIF appears in an array argv, with argc as the length of the array and thus the arity of the function. The Nth argument of the function can be accessed as - argv[N-1]. NIFs also takes an environment argument that + argv[N-1]. 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.

@@ -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 NULL.

+ in this simple example so we set them all to NULL.

Function arguments and return values are represented as values of type ERL_NIF_TERM. We use functions like enif_get_int and enif_make_int to convert between Erlang term and C-type. -- cgit v1.2.3