summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Jerram <neil@ossau.uklinux.net>2009-06-30 23:56:40 +0100
committerNeil Jerram <neil@ossau.uklinux.net>2009-06-30 23:56:40 +0100
commitc7c36fcf408e792a2eec1b27a9a416829b502c3c (patch)
tree8528925f64a43c083a46748a294156d22926d57d
parent0ed755ba5823ecc830466df8f524246ddb0e4ff9 (diff)
downloadguile-c7c36fcf408e792a2eec1b27a9a416829b502c3c.tar.gz
Correction to doc on Accessing Arrays from C
Thanks to Ludovic for the new wording! * doc/ref/api-compound.texi (Accessing Arrays from C): Correct text to reflect the current implementation of scm_array_get_handle and scm_array_handle_release - which don't actuall do any dynwind stuff.
-rw-r--r--doc/ref/api-compound.texi22
1 files changed, 7 insertions, 15 deletions
diff --git a/doc/ref/api-compound.texi b/doc/ref/api-compound.texi
index c551c4d10..5ecaca42a 100644
--- a/doc/ref/api-compound.texi
+++ b/doc/ref/api-compound.texi
@@ -2342,21 +2342,13 @@ the danger of a deadlock. In a multi-threaded program, you will need
additional synchronization to avoid modifying reserved arrays.)
You must take care to always unreserve an array after reserving it,
-also in the presence of non-local exits. To simplify this, reserving
-and unreserving work like a dynwind context (@pxref{Dynamic Wind}): a
-call to @code{scm_array_get_handle} can be thought of as beginning a
-dynwind context and @code{scm_array_handle_release} as ending it.
-When a non-local exit happens between these two calls, the array is
-implicitely unreserved.
-
-That is, you need to properly pair reserving and unreserving in your
-code, but you don't need to worry about non-local exits.
-
-These calls and other pairs of calls that establish dynwind contexts
-need to be properly nested. If you begin a context prior to reserving
-an array, you need to unreserve the array before ending the context.
-Likewise, when reserving two or more arrays in a certain order, you
-need to unreserve them in the opposite order.
+even in the presence of non-local exits. If a non-local exit can
+happen between these two calls, you should install a dynwind context
+that releases the array when it is left (@pxref{Dynamic Wind}).
+
+In addition, array reserving and unreserving must be properly
+paired. For instance, when reserving two or more arrays in a certain
+order, you need to unreserve them in the opposite order.
Once you have reserved an array and have retrieved the pointer to its
elements, you must figure out the layout of the elements in memory.