Skip to content

Commit 2371e12

Browse files
committed
fix build
1 parent 9292bf0 commit 2371e12

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ext/gmp/gmp.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,15 +137,15 @@ static bool gmp_zend_parse_arg_into_mpz_ex(
137137
* but operator overloading with objects should behave as if a
138138
* method was called, thus strict types should apply. */
139139
if (!ZEND_ARG_USES_STRICT_TYPES()) {
140-
zend_long lval = 0;
141140
if (is_operator && Z_TYPE_P(arg) == IS_NULL) {
142141
return false;
143142
}
144-
if (!zend_parse_arg_long_weak(arg, &lval, arg_num)) {
143+
zend_opt_long result = zend_parse_arg_long_weak(arg, arg_num);
144+
if (!result.has_value) {
145145
return false;
146146
}
147147

148-
mpz_set_si(*destination_mpz_ptr, lval);
148+
mpz_set_si(*destination_mpz_ptr, result.value);
149149

150150
return true;
151151
}

0 commit comments

Comments
 (0)