mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-25 04:55:04 +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)); \
|
d.value = OP(obj_obj2int(z)); \
|
||||||
} else if (type_of(z) == integer_tag) { \
|
} else if (type_of(z) == integer_tag) { \
|
||||||
d.value = OP(((integer_type *)z)->value); \
|
d.value = OP(((integer_type *)z)->value); \
|
||||||
|
} else if (type_of(z) == bignum_tag) { \
|
||||||
|
d.value = OP(mp_get_double(&bignum_value(z))); \
|
||||||
} else { \
|
} else { \
|
||||||
d.value = OP(((double_type *)z)->value); \
|
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); \
|
i = obj_obj2int(z); \
|
||||||
} else if (type_of(z) == integer_tag) { \
|
} else if (type_of(z) == integer_tag) { \
|
||||||
i = (int)OP(((integer_type *)z)->value); \
|
i = (int)OP(((integer_type *)z)->value); \
|
||||||
|
} else if (type_of(z) == bignum_tag) { \
|
||||||
|
return_closcall1(data, cont, z); \
|
||||||
} else { \
|
} else { \
|
||||||
i = (int)OP(((double_type *)z)->value); \
|
i = (int)OP(((double_type *)z)->value); \
|
||||||
} \
|
} \
|
||||||
|
|
|
@ -680,6 +680,7 @@ typedef union {
|
||||||
void **vpbuffer_realloc(void **buf, int *len);
|
void **vpbuffer_realloc(void **buf, int *len);
|
||||||
void **vpbuffer_add(void **buf, int *len, int i, void *obj);
|
void **vpbuffer_add(void **buf, int *len, int i, void *obj);
|
||||||
void vpbuffer_free(void **buf);
|
void vpbuffer_free(void **buf);
|
||||||
|
double mp_get_double(mp_int *a);
|
||||||
|
|
||||||
/* GC prototypes */
|
/* GC prototypes */
|
||||||
void gc_initialize();
|
void gc_initialize();
|
||||||
|
|
Loading…
Add table
Reference in a new issue