mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-03-10 07:00:20 -07:00
bignum: move ecl_init_bignum_registers to bignum.d
This commit is contained in:
parent
f9ad8de531
commit
1d5b8fd525
2 changed files with 20 additions and 22 deletions
20
src/c/big.d
20
src/c/big.d
|
|
@ -628,6 +628,26 @@ _ecl_big_boole_operator(int op)
|
|||
return bignum_operations[op];
|
||||
}
|
||||
|
||||
void
|
||||
ecl_init_bignum_registers(cl_env_ptr env)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < ECL_BIGNUM_REGISTER_NUMBER; i++) {
|
||||
cl_object x = ecl_alloc_object(t_bignum);
|
||||
_ecl_big_init2(x, ECL_BIG_REGISTER_SIZE);
|
||||
env->big_register[i] = x;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ecl_clear_bignum_registers(cl_env_ptr env)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < ECL_BIGNUM_REGISTER_NUMBER; i++) {
|
||||
_ecl_big_clear(env->big_register[i]);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
init_big()
|
||||
{
|
||||
|
|
|
|||
22
src/c/main.d
22
src/c/main.d
|
|
@ -130,26 +130,6 @@ ecl_set_option(int option, cl_fixnum value)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
ecl_init_bignum_registers(cl_env_ptr env)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < ECL_BIGNUM_REGISTER_NUMBER; i++) {
|
||||
cl_object x = ecl_alloc_object(t_bignum);
|
||||
_ecl_big_init2(x, ECL_BIG_REGISTER_SIZE);
|
||||
env->big_register[i] = x;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ecl_clear_bignum_registers(cl_env_ptr env)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < ECL_BIGNUM_REGISTER_NUMBER; i++) {
|
||||
_ecl_big_clear(env->big_register[i]);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ecl_init_env(cl_env_ptr env)
|
||||
{
|
||||
|
|
@ -535,8 +515,6 @@ cl_boot(int argc, char **argv)
|
|||
cl_core.path_max = MAXPATHLEN;
|
||||
#endif
|
||||
|
||||
env->packages_to_be_created = ECL_NIL;
|
||||
|
||||
#ifdef ECL_THREADS
|
||||
env->bindings_array = si_make_vector(ECL_T, ecl_make_fixnum(1024),
|
||||
ECL_NIL, ECL_NIL, ECL_NIL, ECL_NIL);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue