Preliminary bignum integration

This commit is contained in:
Justin Ethier 2017-02-16 02:38:57 -05:00
parent d317539528
commit ad51bc7e80
2 changed files with 5 additions and 0 deletions

View file

@ -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); \
} \

View file

@ -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();