mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
mruby-bigint (uzero_p): add fast path
This commit is contained in:
@@ -248,6 +248,7 @@ ucmp(mpz_t *y, mpz_t *x)
|
||||
static int
|
||||
uzero_p(mpz_t *x)
|
||||
{
|
||||
if (x->sz == 0) return 1;
|
||||
for (size_t i=0; i < x->sz; i++)
|
||||
if (x->p[i] != 0)
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user