Merge commit '5af307de43e4b65eec7f235b48a8908f2a00f134'
[bpt/guile.git] / doc / ref / api-data.texi
index d98c938..3f787b1 100644 (file)
@@ -445,6 +445,8 @@ function will always succeed and will always return an exact number.
 @deftypefnx {C Function} scm_t_uint64 scm_to_uint64 (SCM x)
 @deftypefnx {C Function} scm_t_intmax scm_to_intmax (SCM x)
 @deftypefnx {C Function} scm_t_uintmax scm_to_uintmax (SCM x)
+@deftypefnx {C Function} scm_t_intptr scm_to_intptr_t (SCM x)
+@deftypefnx {C Function} scm_t_uintptr scm_to_uintptr_t (SCM x)
 When @var{x} represents an exact integer that fits into the indicated
 C type, return that integer.  Else signal an error, either a
 `wrong-type' error when @var{x} is not an exact integer, or an
@@ -479,6 +481,8 @@ the corresponding types are.
 @deftypefnx {C Function} SCM scm_from_uint64 (scm_t_uint64 x)
 @deftypefnx {C Function} SCM scm_from_intmax (scm_t_intmax x)
 @deftypefnx {C Function} SCM scm_from_uintmax (scm_t_uintmax x)
+@deftypefnx {C Function} SCM scm_from_intptr_t (scm_t_intptr x)
+@deftypefnx {C Function} SCM scm_from_uintptr_t (scm_t_uintptr x)
 Return the @code{SCM} value that represents the integer @var{x}.
 These functions will always succeed and will always return an exact
 number.
@@ -4497,6 +4501,19 @@ returned is the number of bytes for @code{scm_to_latin1_stringn} and
 for @code{scm_to_utf32_stringn}.
 @end deftypefn
 
+It is not often the case, but sometimes when you are dealing with the
+implementation details of a port, you need to encode and decode strings
+according to the encoding and conversion strategy of the port.  There
+are some convenience functions for that purpose as well.
+
+@deftypefn {C Function} SCM scm_from_port_string (const char *str, SCM port)
+@deftypefnx {C Function} SCM scm_from_port_stringn (const char *str, size_t len, SCM port)
+@deftypefnx {C Function} char* scm_to_port_string (SCM str, SCM port)
+@deftypefnx {C Function} char* scm_to_port_stringn (SCM str, size_t *lenp, SCM port)
+Like @code{scm_from_stringn} and friends, except they take their
+encoding and conversion strategy from a given port object.
+@end deftypefn
+
 @node String Internals
 @subsubsection String Internals