mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-24 13:31:58 -08:00
random-state: add ext:random-state-array function
This function will return random-state array. This is meant for next commit which implements MAKE-LOAD-FORM for random-state objects.
This commit is contained in:
parent
ab2e5a3593
commit
e1d11cddbd
4 changed files with 11 additions and 1 deletions
|
|
@ -338,3 +338,9 @@ cl_random_state_p(cl_object x)
|
|||
{
|
||||
@(return (ECL_RANDOM_STATE_P(x) ? ECL_T : ECL_NIL));
|
||||
}
|
||||
|
||||
cl_object
|
||||
si_random_state_array(cl_object rs) {
|
||||
ecl_check_cl_type(@'ext::random-state-array', rs, t_random);
|
||||
return rs->random.value;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2207,6 +2207,8 @@ cl_symbols[] = {
|
|||
{EXT_ "HASH-TABLE-CONTENT", EXT_ORDINARY, si_hash_table_content, 1, OBJNULL},
|
||||
{EXT_ "HASH-TABLE-FILL", EXT_ORDINARY, si_hash_table_fill, 2, OBJNULL},
|
||||
|
||||
{EXT_ "RANDOM-STATE-ARRAY", EXT_ORDINARY, si_random_state_array, 1, OBJNULL},
|
||||
|
||||
{SYS_ "REPORT-FUNCTION", SI_ORDINARY, NULL, -1, OBJNULL},
|
||||
|
||||
{SYS_ "DO-DEFSETF", SI_ORDINARY, ECL_NAME(si_do_defsetf), -1, OBJNULL},
|
||||
|
|
|
|||
|
|
@ -2207,6 +2207,8 @@ cl_symbols[] = {
|
|||
{EXT_ "HASH-TABLE-CONTENT","si_hash_table_content"},
|
||||
{EXT_ "HASH-TABLE-FILL","si_hash_table_fill"},
|
||||
|
||||
{EXT_ "RANDOM-STATE-ARRAY","si_random_state_array"},
|
||||
|
||||
{SYS_ "REPORT-FUNCTION",NULL},
|
||||
|
||||
{SYS_ "DO-DEFSETF","ECL_NAME(si_do_defsetf)"},
|
||||
|
|
|
|||
|
|
@ -1237,7 +1237,7 @@ extern ECL_API cl_object cl_random_state_p(cl_object x);
|
|||
extern ECL_API cl_object cl_random _ECL_ARGS((cl_narg narg, cl_object x, ...));
|
||||
extern ECL_API cl_object cl_make_random_state _ECL_ARGS((cl_narg narg, ...));
|
||||
extern ECL_API cl_object ecl_make_random_state(cl_object rs);
|
||||
|
||||
extern ECL_API cl_object si_random_state_array(cl_object rs);
|
||||
|
||||
/* num_sfun.c */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue