From cb50ed84a2d8afc904d1c6ce90edb5c32da1be48 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Thu, 16 Dec 2010 12:21:27 +0100 Subject: Fix minor typos in erl_nif documentation enif_realloc_binary return int enif_alloc/enif_free does not accept env as first argument. enif_send return int enif_self in alphabetic order --- erts/doc/src/erl_nif.xml | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml index 27887cbdf6..5987ddbd5e 100644 --- a/erts/doc/src/erl_nif.xml +++ b/erts/doc/src/erl_nif.xml @@ -4,7 +4,7 @@
- 20012010 + 20012011 Ericsson AB. All Rights Reserved. @@ -464,7 +464,7 @@ typedef enum { - void*enif_alloc(ErlNifEnv* env, size_t size) + void*enif_alloc(size_t size) Allocate dynamic memory.

Allocate memory of size bytes. Return NULL if allocation failed.

@@ -539,7 +539,7 @@ typedef enum {

Same as erl_drv_equal_tids.

- voidenif_free(ErlNifEnv* env, void* ptr) + voidenif_free(void* ptr) Free dynamic memory

Free memory allocated by enif_alloc.

@@ -857,11 +857,6 @@ typedef enum { enif_release_resource.

- ErlNifPid*enif_self(ErlNifEnv* caller_env, ErlNifPid* pid) - Get the pid of the calling process. -

Initialize the pid variable *pid to represent the - calling process. Return pid.

-
ERL_NIF_TERMenif_make_string(ErlNifEnv* env, const char* string, ErlNifCharEncoding encoding) Create a string.

Create a list containing the characters of the @@ -980,11 +975,12 @@ typedef enum { reload or upgrade.

Was previously named enif_get_data.

- voidenif_realloc_binary(ErlNifBinary* bin, size_t size) + intenif_realloc_binary(ErlNifBinary* bin, size_t size) Change the size of a binary.

Change the size of a binary bin. The source binary may be read-only, in which case it will be left untouched and - a mutable copy is allocated and assigned to *bin.

+ a mutable copy is allocated and assigned to *bin. Return true on success, + false if memory allocation failed.

voidenif_release_binary(ErlNifBinary* bin) Release a binary. @@ -1041,7 +1037,12 @@ typedef enum {

Same as erl_drv_rwlock_tryrwlock.

- unsignedenif_send(ErlNifEnv* env, ErlNifPid* to_pid, ErlNifEnv* msg_env, ERL_NIF_TERM msg) + ErlNifPid*enif_self(ErlNifEnv* caller_env, ErlNifPid* pid) + Get the pid of the calling process. +

Initialize the pid variable *pid to represent the + calling process. Return pid.

+
+ intenif_send(ErlNifEnv* env, ErlNifPid* to_pid, ErlNifEnv* msg_env, ERL_NIF_TERM msg) Send a message to a process.

Send a message to a process.

-- cgit v1.2.3