FETCH_GMP_ZVAL(gmpnum_b, b_arg);
}
+ convert_to_long_ex(b_arg);
+ if (!Z_LVAL_PP(b_arg)) {
+ RETURN_FALSE;
+ }
+
INIT_GMP_NUM(gmpnum_result);
if (use_ui && gmp_ui_op) {
FETCH_GMP_ZVAL(gmpnum_b, b_arg);
}
+ convert_to_long_ex(b_arg);
+ if (!Z_LVAL_PP(b_arg)) {
+ RETURN_FALSE;
+ }
+
INIT_GMP_NUM(gmpnum_result1);
INIT_GMP_NUM(gmpnum_result2);
WRONG_PARAM_COUNT;
}
- convert_to_long_ex(mod_arg);
- if (!Z_LVAL_PP(mod_arg)) {
- RETURN_FALSE;
- }
-
FETCH_GMP_ZVAL(gmpnum_base, base_arg);
if (Z_TYPE_PP(exp_arg) == IS_LONG && Z_LVAL_PP(exp_arg) >= 0) {
}
FETCH_GMP_ZVAL(gmpnum_mod, mod_arg);
+ convert_to_long_ex(mod_arg);
+ if (!Z_LVAL_PP(mod_arg)) {
+ RETURN_FALSE;
+ }
+
INIT_GMP_NUM(gmpnum_result);
if (use_ui) {
mpz_powm_ui(*gmpnum_result, *gmpnum_base, (unsigned long)Z_LVAL_PP(exp_arg), *gmpnum_mod);