We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c77d97f commit feaabd0Copy full SHA for feaabd0
ext/gmp/gmp.c
@@ -1388,11 +1388,12 @@ ZEND_FUNCTION(gmp_pow)
1388
RETURN_FALSE;
1389
}
1390
1391
- INIT_GMP_RETVAL(gmpnum_result);
1392
if (Z_TYPE_P(base_arg) == IS_LONG && Z_LVAL_P(base_arg) >= 0) {
+ INIT_GMP_RETVAL(gmpnum_result);
1393
mpz_ui_pow_ui(gmpnum_result, Z_LVAL_P(base_arg), exp);
1394
} else {
1395
FETCH_GMP_ZVAL(gmpnum_base, base_arg, temp_base);
1396
1397
mpz_pow_ui(gmpnum_result, gmpnum_base, exp);
1398
FREE_GMP_TEMP(temp_base);
1399
0 commit comments