mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-23 20:15:05 +02:00
Preliminary bignum integration
This commit is contained in:
parent
d317539528
commit
ad51bc7e80
2 changed files with 5 additions and 0 deletions
|
@ -100,6 +100,8 @@ object Cyc_global_set(void *thd, object * glo, object value);
|
|||
d.value = OP(obj_obj2int(z)); \
|
||||
} else if (type_of(z) == integer_tag) { \
|
||||
d.value = OP(((integer_type *)z)->value); \
|
||||
} else if (type_of(z) == bignum_tag) { \
|
||||
d.value = OP(mp_get_double(&bignum_value(z))); \
|
||||
} else { \
|
||||
d.value = OP(((double_type *)z)->value); \
|
||||
} \
|
||||
|
@ -112,6 +114,8 @@ object Cyc_global_set(void *thd, object * glo, object value);
|
|||
i = obj_obj2int(z); \
|
||||
} else if (type_of(z) == integer_tag) { \
|
||||
i = (int)OP(((integer_type *)z)->value); \
|
||||
} else if (type_of(z) == bignum_tag) { \
|
||||
return_closcall1(data, cont, z); \
|
||||
} else { \
|
||||
i = (int)OP(((double_type *)z)->value); \
|
||||
} \
|
||||
|
|
|
@ -680,6 +680,7 @@ typedef union {
|
|||
void **vpbuffer_realloc(void **buf, int *len);
|
||||
void **vpbuffer_add(void **buf, int *len, int i, void *obj);
|
||||
void vpbuffer_free(void **buf);
|
||||
double mp_get_double(mp_int *a);
|
||||
|
||||
/* GC prototypes */
|
||||
void gc_initialize();
|
||||
|
|
Loading…
Add table
Reference in a new issue