File tree Expand file tree Collapse file tree 1 file changed +3
-15
lines changed Expand file tree Collapse file tree 1 file changed +3
-15
lines changed Original file line number Diff line number Diff line change @@ -427,25 +427,13 @@ static zend_result shift_operator_helper(gmp_binary_ui_op_t op, zval *return_val
427
427
return FAILURE ;
428
428
} else {
429
429
mpz_ptr gmpnum_op , gmpnum_result ;
430
- gmp_temp_t temp ;
431
430
432
- /* We do not use FETCH_GMP_ZVAL(...); here as we don't use convert_to_gmp()
433
- * as we want to handle the emitted exception ourself. */
434
- if (UNEXPECTED (!IS_GMP (op1 ))) {
435
- if (UNEXPECTED (Z_TYPE_P (op1 ) != IS_LONG )) {
436
- goto typeof_op_failure ;
437
- }
438
- mpz_init (temp .num );
439
- mpz_set_si (temp .num , Z_LVAL_P (op1 ));
440
- temp .is_used = 1 ;
441
- gmpnum_op = temp .num ;
442
- } else {
443
- gmpnum_op = GET_GMP_FROM_ZVAL (op1 );
444
- temp .is_used = 0 ;
431
+ if (!gmp_zend_parse_arg_into_mpz_ex (op1 , & gmpnum_op , 1 , true)) {
432
+ goto typeof_op_failure ;
445
433
}
434
+
446
435
INIT_GMP_RETVAL (gmpnum_result );
447
436
op (gmpnum_result , gmpnum_op , (gmp_ulong ) shift );
448
- FREE_GMP_TEMP (temp );
449
437
return SUCCESS ;
450
438
}
451
439
You can’t perform that action at this time.
0 commit comments