433 |
These routines convert the Scheme object to the given C type. |
These routines convert the Scheme object to the given C type. |
434 |
@end deftypefun |
@end deftypefun |
435 |
|
|
436 |
@deftypefun char *gh_scm2newstr (SCM @var{str}, size_t *@var{lenp}) |
@deftypefun {char *} gh_scm2newstr (SCM @var{str}, size_t *@var{lenp}) |
437 |
Given a Scheme string @var{str}, return a pointer to a new copy of its |
Given a Scheme string @var{str}, return a pointer to a new copy of its |
438 |
contents, followed by a null byte. If @var{lenp} is non-null, set |
contents, followed by a null byte. If @var{lenp} is non-null, set |
439 |
@code{*@var{lenp}} to the string's length. |
@code{*@var{lenp}} to the string's length. |
459 |
out-of-range error. |
out-of-range error. |
460 |
@end deftypefun |
@end deftypefun |
461 |
|
|
462 |
@deftypefun char *gh_symbol2newstr (SCM @var{sym}, int *@var{lenp}) |
@deftypefun {char *} gh_symbol2newstr (SCM @var{sym}, int *@var{lenp}) |
463 |
Takes a Scheme symbol and returns a string of the form |
Takes a Scheme symbol and returns a string of the form |
464 |
@code{"'symbol-name"}. If @var{lenp} is non-null, the string's length |
@code{"'symbol-name"}. If @var{lenp} is non-null, the string's length |
465 |
is returned in @code{*@var{lenp}}. |
is returned in @code{*@var{lenp}}. |
468 |
caller is responsible for freeing it. |
caller is responsible for freeing it. |
469 |
@end deftypefun |
@end deftypefun |
470 |
|
|
471 |
@deftypefun char *gh_scm2chars (SCM @var{vector}, chars *@var{result}) |
@deftypefun {char *} gh_scm2chars (SCM @var{vector}, chars *@var{result}) |
472 |
@deftypefunx short *gh_scm2shorts (SCM @var{vector}, short *@var{result}) |
@deftypefunx {short *} gh_scm2shorts (SCM @var{vector}, short *@var{result}) |
473 |
@deftypefunx long *gh_scm2longs (SCM @var{vector}, long *@var{result}) |
@deftypefunx {long *} gh_scm2longs (SCM @var{vector}, long *@var{result}) |
474 |
@deftypefunx float *gh_scm2floats (SCM @var{vector}, float *@var{result}) |
@deftypefunx {float *} gh_scm2floats (SCM @var{vector}, float *@var{result}) |
475 |
@deftypefunx double *gh_scm2doubles (SCM @var{vector}, double *@var{result}) |
@deftypefunx {double *} gh_scm2doubles (SCM @var{vector}, double *@var{result}) |
476 |
Copy the numbers in @var{vector} to the array pointed to by @var{result} |
Copy the numbers in @var{vector} to the array pointed to by @var{result} |
477 |
and return it. If @var{result} is NULL, allocate a double array large |
and return it. If @var{result} is NULL, allocate a double array large |
478 |
enough. |
enough. |