r3448: *** empty log message ***
[uffi.git] / doc / ref.sgml
index 827ac079f6e3e39f5102540b8a8964bc3d1c2c59..39ae02ebaf9a920fceb1b76cef1a1671bd0f70fb 100644 (file)
@@ -1495,12 +1495,23 @@ if a cstring returned by a function is &null;.
 <partintro>
 <title>Overview</title>
 <para>
-         &uffi; has functions to two types of <varname>C</varname>-compatible 
+
+         &uffi; has functions to two types of
+<varname>C</varname>-compatible
          strings, <emphasis>cstring</emphasis> and <emphasis>foreign</emphasis> strings.
-cstrings are used as parameters to and from functions. An implementation, such as CMUCL,
-may not convert these to a foreign type for efficiency sake. Thus, it is not
-possible to "allocate" a cstring. In contrast, foreign strings
-always need to have memory for them.
+
+cstrings are used as parameters to and from functions. An
+implementation, such as CMUCL and Lispworks, a cstring may not be a
+foreign type but rather the Lisp string itself while on other
+platforms a cstring is a newly allocated foreign vector for storing
+characters. Thus, it is not possible to portably
+<emphasis>allocate</emphasis> a cstring. 
+</para>
+<para>
+In contrast, foreign strings
+are always a foreign vector of characters which have a memory
+allocated to hold them. Because of this, if you need to allocate memory to
+hold the return value of a string, use a foreign string and not a cstring.
        </para>
 </partintro>
 
@@ -1602,7 +1613,7 @@ that returns a cstring.
       </refsect1>
       <refsect1>
        <title>Side Effects</title>
-       <para>None.</para>
+       <para>On some implementations, this function allocates memory.</para>
       </refsect1>
       <refsect1>
        <title>Affected by</title>
@@ -1704,7 +1715,7 @@ that returns a cstring.
       <refsect1>
        <title>Description</title>
        <para>
-         Binds a lexical variable to a newly allocated <varname>cstring</varname>. Automatically frees <varname>cstring</varname>.
+         Binds a symbol to a cstring created from conversion of a string. Automatically frees the <varname>cstring</varname>.
        </para>
       </refsect1>
       <refsect1>