[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.0-200-g68a78
From: |
Mark H Weaver |
Subject: |
[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.0-200-g68a7873 |
Date: |
Wed, 20 Apr 2011 04:01:44 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".
http://git.savannah.gnu.org/cgit/guile.git/commit/?id=68a78738a4a3248c8c5ea1965936998763ff2d2e
The branch, stable-2.0 has been updated
via 68a78738a4a3248c8c5ea1965936998763ff2d2e (commit)
from 0fbdbe6c840d26f3910dfdcfe4049f8769786c24 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 68a78738a4a3248c8c5ea1965936998763ff2d2e
Author: Mark H Weaver <address@hidden>
Date: Tue Apr 19 23:59:17 2011 -0400
Clarify the units of returned lengths in string conversion functions
* doc/ref/api-data.texi (Conversion to/from C): In descriptions of
scm_to_stringn and scm_to_{latin1,utf8,utf32}, clarify that the
returned length is in units of bytes or code points, not characters.
Also change NULL to @code{NULL} in a few places.
-----------------------------------------------------------------------
Summary of changes:
doc/ref/api-data.texi | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/doc/ref/api-data.texi b/doc/ref/api-data.texi
index 760039a..0cae22f 100644
--- a/doc/ref/api-data.texi
+++ b/doc/ref/api-data.texi
@@ -4280,13 +4280,13 @@ strings to Scheme.
@deftypefn {C Function} char *scm_to_stringn (SCM str, size_t *lenp, const
char *encoding, scm_t_string_failed_conversion_handler handler)
This function returns a newly allocated C string from the Guile string
address@hidden The length of the string will be returned in @var{lenp}.
-The character encoding of the C string is passed as the ASCII,
address@hidden The length of the returned string in bytes will be returned in
address@hidden The character encoding of the C string is passed as the ASCII,
null-terminated C string @var{encoding}. The @var{handler} parameter
gives a strategy for dealing with characters that cannot be converted
into @var{encoding}.
-If @var{lenp} is NULL, this function will return a null-terminated C
+If @var{lenp} is @code{NULL}, this function will return a null-terminated C
string. It will throw an error if the string contains a null
character.
@end deftypefn
@@ -4325,11 +4325,14 @@ in @var{str} in the case of
@code{scm_from_utf32_stringn}.
@deftypefnx {C function} scm_t_wchar *scm_to_utf32_stringn (SCM str, size_t
*lenp)
Return a newly allocated, ISO-8859-1-, UTF-8-, or UTF-32-encoded C string
from Scheme string @var{str}. An error is thrown when @var{str}
-string cannot be converted to the specified encoding. If @var{lenp} is
+cannot be converted to the specified encoding. If @var{lenp} is
@code{NULL}, the returned C string will be null terminated, and an error
will be thrown if the C string would otherwise contain null
-characters. If @var{lenp} is not NULL, the length of the string is
-returned in @var{lenp}, and the string is not null terminated.
+characters. If @var{lenp} is not @code{NULL}, the string is not null
terminated,
+and the length of the returned string is returned in @var{lenp}. The length
+returned is the number of bytes for @code{scm_to_latin1_stringn} and
address@hidden; it is the number of elements (code points)
+for @code{scm_to_utf32_stringn}.
@end deftypefn
@node String Internals
hooks/post-receive
--
GNU Guile
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.0-200-g68a7873,
Mark H Weaver <=