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 89eaa1f commit 0b5b947Copy full SHA for 0b5b947
ext/gmp/gmp.c
@@ -481,7 +481,8 @@ static int gmp_compare(zval *op1, zval *op2) /* {{{ */
481
}
482
return ZEND_UNCOMPARABLE;
483
484
- return mpz_cmp(gmp_op1, gmp_op2);
+
485
+ return ZEND_THREEWAY_COMPARE(mpz_cmp(gmp_op1, gmp_op2), 0);
486
487
/* }}} */
488
@@ -1436,7 +1437,7 @@ ZEND_FUNCTION(gmp_cmp)
1436
1437
GMP_Z_PARAM_INTO_MPZ_PTR(gmpnum_b)
1438
ZEND_PARSE_PARAMETERS_END();
1439
- RETURN_LONG(mpz_cmp(gmpnum_a, gmpnum_b));
1440
+ RETURN_LONG(ZEND_THREEWAY_COMPARE(mpz_cmp(gmpnum_a, gmpnum_b), 0));
1441
1442
1443
0 commit comments