This repository has been archived on 2026-04-17. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
bhlib-old/include/bh/internal/bigint.h

32 lines
645 B
C

#ifndef BH_INTERNAL_BIGINT_H
#define BH_INTERNAL_BIGINT_H
#include "bh.h"
#include <bh/bigint.h>
#if defined(BH_BIGINT_LONG)
#define BH_BIGINT_BITS 31
#define BH_BIGINT_MASK 0x7FFFFFFF
#define BH_BIGINT_TYPE bh_uint32_t
#define BH_BIGINT_TMP bh_uint64_t
#else
#define BH_BIGINT_BITS 15
#define BH_BIGINT_MASK 0x7FFF
#define BH_BIGINT_TYPE bh_uint16_t
#define BH_BIGINT_TMP bh_uint32_t
#endif
struct bh_bigint_s
{
BH_BIGINT_TYPE *data;
size_t size;
size_t capacity;
int type;
int error;
};
void bh_bigint_init(bh_bigint_t *bigint);
void bh_bigint_destroy(bh_bigint_t *bigint);
#endif /* BH_INTERNAL_BIGINT_H */