mirror of
https://github.com/bellard/quickjs.git
synced 2025-05-15 10:45:02 +08:00
compilation fix
This commit is contained in:
parent
543897ab7b
commit
ee4cd4deac
@ -379,7 +379,7 @@ typedef struct JSBigInt {
|
|||||||
|
|
||||||
/* this bigint structure can hold a 64 bit integer */
|
/* this bigint structure can hold a 64 bit integer */
|
||||||
typedef struct {
|
typedef struct {
|
||||||
JSBigInt big_int;
|
js_limb_t big_int_buf[sizeof(JSBigInt) / sizeof(js_limb_t)]; /* for JSBigInt */
|
||||||
/* must come just after */
|
/* must come just after */
|
||||||
js_limb_t tab[(64 + JS_LIMB_BITS - 1) / JS_LIMB_BITS];
|
js_limb_t tab[(64 + JS_LIMB_BITS - 1) / JS_LIMB_BITS];
|
||||||
} JSBigIntBuf;
|
} JSBigIntBuf;
|
||||||
@ -10195,7 +10195,7 @@ static JSBigInt *js_bigint_new(JSContext *ctx, int len)
|
|||||||
|
|
||||||
static JSBigInt *js_bigint_set_si(JSBigIntBuf *buf, js_slimb_t a)
|
static JSBigInt *js_bigint_set_si(JSBigIntBuf *buf, js_slimb_t a)
|
||||||
{
|
{
|
||||||
JSBigInt *r = &buf->big_int;
|
JSBigInt *r = (JSBigInt *)buf->big_int_buf;
|
||||||
r->len = 1;
|
r->len = 1;
|
||||||
r->tab[0] = a;
|
r->tab[0] = a;
|
||||||
return r;
|
return r;
|
||||||
@ -10901,7 +10901,7 @@ static JSBigInt *js_bigint_from_float64(JSContext *ctx, int *pres, double a1)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* the integer is mant*2^e */
|
/* the integer is mant*2^e */
|
||||||
r = &buf.big_int;
|
r = (JSBigInt *)buf.big_int_buf;
|
||||||
#if JS_LIMB_BITS == 64
|
#if JS_LIMB_BITS == 64
|
||||||
r->len = 1;
|
r->len = 1;
|
||||||
r->tab[0] = mant;
|
r->tab[0] = mant;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user