summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2017-08-21 09:49:52 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2017-08-21 09:49:52 +0000
commit356f7e2d655a38254903344210bf94dad0d82e82 (patch)
treec0611d59e15ef5b81f248b93462d9f6a322ac2f6
parentc406042241051b3a2eeac79f0462fa2b90da28da (diff)
downloadmpfr-356f7e2d655a38254903344210bf94dad0d82e82.tar.gz
[doc/mpfr.texi] Update about the memory allocation (added references
to Section "Memory Handling"). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@11632 280ebfd0-de03-0410-8827-d642c229c3f4
-rw-r--r--doc/mpfr.texi18
1 files changed, 6 insertions, 12 deletions
diff --git a/doc/mpfr.texi b/doc/mpfr.texi
index f302c29ea..c3728b167 100644
--- a/doc/mpfr.texi
+++ b/doc/mpfr.texi
@@ -1545,8 +1545,8 @@ but in some very rare cases, it might be @math{m+1}
for bases 7 and 49).
If @var{str} is a null pointer, space for the significand is allocated using
-the current allocation function and a pointer to the string is returned
-(unless the base is invalid).
+the allocation function (@pxref{Memory Handling}) and a pointer to the string
+is returned (unless the base is invalid).
To free the returned string, you must use @code{mpfr_free_str}.
If @var{str} is not a null pointer, it should point to a block of storage
@@ -1562,16 +1562,9 @@ whether the flags are set by this function is unspecified.
@end deftypefun
@deftypefun void mpfr_free_str (char *@var{str})
-Free a string allocated by @code{mpfr_get_str} using the current unallocation
-function.
+Free a string allocated by @code{mpfr_get_str} using the unallocation
+function (@pxref{Memory Handling}).
The block is assumed to be @code{strlen(@var{str})+1} bytes.
-For more information about how it is done:
-@ifinfo
-@pxref{Custom Allocation,,, gmp.info,GNU MP}.
-@end ifinfo
-@ifnotinfo
-see Section ``Custom Allocation'' in @cite{GNU MP}.
-@end ifnotinfo
@end deftypefun
@deftypefun int mpfr_fits_ulong_p (mpfr_t @var{op}, mpfr_rnd_t @var{rnd})
@@ -2472,7 +2465,8 @@ the terminating null character, or a negative value if an error occurred.
@deftypefun int mpfr_asprintf (char **@var{str}, const char *@var{template}, @dots{})
@deftypefunx int mpfr_vasprintf (char **@var{str}, const char *@var{template}, va_list @var{ap})
Write their output as a null terminated string in a block of memory allocated
-using the current allocation function. A pointer to the block is stored in
+using the allocation function (@pxref{Memory Handling}). A pointer to the
+block is stored in
@var{str}. The block of memory must be freed using @code{mpfr_free_str}.
The return value is the number of characters written in the string, excluding
the null-terminator, or a negative value if an error occurred, in which case