py/mpz: Make mpz_is_zero() an inline function.
It's more efficient as an inline function, and saves code size.
This commit is contained in:
2
py/mpz.h
2
py/mpz.h
@@ -111,7 +111,7 @@ void mpz_set_from_float(mpz_t *z, mp_float_t src);
|
||||
size_t mpz_set_from_str(mpz_t *z, const char *str, size_t len, bool neg, unsigned int base);
|
||||
void mpz_set_from_bytes(mpz_t *z, bool big_endian, size_t len, const byte *buf);
|
||||
|
||||
bool mpz_is_zero(const mpz_t *z);
|
||||
static inline bool mpz_is_zero(const mpz_t *z) { return z->len == 0; }
|
||||
int mpz_cmp(const mpz_t *lhs, const mpz_t *rhs);
|
||||
|
||||
void mpz_abs_inpl(mpz_t *dest, const mpz_t *z);
|
||||
|
||||
Reference in New Issue
Block a user