mruby-bigint (mpz_pow): combine mpz_init and mpz_set

This commit is contained in:
Yukihiro "Matz" Matsumoto
2024-12-11 16:55:43 +09:00
parent 8da0db545e
commit b807c0a27d
+1 -2
View File
@@ -1134,8 +1134,7 @@ mpz_pow(mrb_state *mrb, mpz_t *zz, mpz_t *x, mrb_int e)
return;
}
mpz_init(mrb, &t);
mpz_set(mrb, &t, x);
mpz_init_set(mrb, &t, x);
for (;!(mask &e); mask>>=1)
;
mask>>=1;