mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-18 01:30:27 +02:00
* socket.c, rw.c, deprecated.h, validate.h
(SCM_VALIDATE_STRING_COPY): Deprecated. Replaced all uses with SCM_VALIDATE_STRING plus SCM_I_STRING_CHARS or scm_to_locale_string, etc. (SCM_VALIDATE_SUBSTRING_SPEC_COPY): Deprecated. Replaced as above, plus scm_i_get_substring_spec. * regex-posix.c, read.c, random.c, ramap.c, print.c, numbers.c, hash.c, gc.c, gc-card.c, convert.i.c, backtrace.c, strop.c, strorder.c, strports.c, struct.c, symbols.c, unif.c, ports.c: Use SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_STRING_LENGTH instead of SCM_STRING_CHARS, SCM_STRING_UCHARS, and SCM_STRING_LENGTH, respectively. Also, replaced scm_return_first with more explicit scm_remember_upto_here_1, etc, or introduced them in the first place.
This commit is contained in:
parent
70f7ee4188
commit
8824ac88f0
18 changed files with 189 additions and 135 deletions
|
@ -383,11 +383,15 @@ SCM_DEFINE (scm_seed_to_random_state, "seed->random-state", 1, 0, 0,
|
|||
"Return a new random state using @var{seed}.")
|
||||
#define FUNC_NAME s_scm_seed_to_random_state
|
||||
{
|
||||
SCM res;
|
||||
if (SCM_NUMBERP (seed))
|
||||
seed = scm_number_to_string (seed, SCM_UNDEFINED);
|
||||
SCM_VALIDATE_STRING (1, seed);
|
||||
return make_rstate (scm_c_make_rstate (SCM_STRING_CHARS (seed),
|
||||
SCM_STRING_LENGTH (seed)));
|
||||
res = make_rstate (scm_c_make_rstate (SCM_I_STRING_CHARS (seed),
|
||||
SCM_I_STRING_LENGTH (seed)));
|
||||
scm_remember_upto_here_1 (seed);
|
||||
return res;
|
||||
|
||||
}
|
||||
#undef FUNC_NAME
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue