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 60830f4 commit 8e167a2Copy full SHA for 8e167a2
ext/gmp/gmp.c
@@ -1428,11 +1428,12 @@ ZEND_FUNCTION(gmp_pow)
1428
RETURN_FALSE;
1429
}
1430
1431
- INIT_GMP_RETVAL(gmpnum_result);
1432
if (Z_TYPE_P(base_arg) == IS_LONG && Z_LVAL_P(base_arg) >= 0) {
+ INIT_GMP_RETVAL(gmpnum_result);
1433
mpz_ui_pow_ui(gmpnum_result, Z_LVAL_P(base_arg), exp);
1434
} else {
1435
FETCH_GMP_ZVAL(gmpnum_base, base_arg, temp_base);
1436
1437
mpz_pow_ui(gmpnum_result, gmpnum_base, exp);
1438
FREE_GMP_TEMP(temp_base);
1439
0 commit comments