Commit 848dd0e7 authored by Damien George's avatar Damien George
Browse files

py: Make some mpz functions static and remove unused ones.

parent 04749e67
......@@ -572,6 +572,9 @@ void mpz_deinit(mpz_t *z) {
#if 0
these functions are unused
mpz_t *mpz_zero(void) {
mpz_t *z = m_new_obj(mpz_t);
......@@ -603,8 +606,9 @@ mpz_t *mpz_from_str(const char *str, mp_uint_t len, bool neg, mp_uint_t base) {
mpz_set_from_str(z, str, len, neg, base);
return z;
void mpz_free(mpz_t *z) {
STATIC void mpz_free(mpz_t *z) {
if (z != NULL) {
m_del(mpz_dig_t, z->dig, z->alloc);
m_del_obj(mpz_t, z);
......@@ -627,7 +631,7 @@ STATIC void mpz_need_dig(mpz_t *z, mp_uint_t need) {
mpz_t *mpz_clone(const mpz_t *src) {
STATIC mpz_t *mpz_clone(const mpz_t *src) {
mpz_t *z = m_new_obj(mpz_t);
z->neg = src->neg;
z->fixed_dig = 0;
......@@ -82,17 +82,6 @@ void mpz_init_from_int(mpz_t *z, mp_int_t val);
void mpz_init_fixed_from_int(mpz_t *z, mpz_dig_t *dig, mp_uint_t dig_alloc, mp_int_t val);
void mpz_deinit(mpz_t *z);
mpz_t *mpz_zero(void);
mpz_t *mpz_from_int(mp_int_t i);
mpz_t *mpz_from_ll(long long i, bool is_signed);
mpz_t *mpz_from_float(mp_float_t i);
mpz_t *mpz_from_str(const char *str, mp_uint_t len, bool neg, mp_uint_t base);
void mpz_free(mpz_t *z);
mpz_t *mpz_clone(const mpz_t *src);
void mpz_set(mpz_t *dest, const mpz_t *src);
void mpz_set_from_int(mpz_t *z, mp_int_t src);
void mpz_set_from_ll(mpz_t *z, long long i, bool is_signed);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment