cvs: php-src(PHP_5_3) /ext/gmp gmp.c

From: Date: Wed, 30 Jan 2008 18:25:51 +0000
Subject: cvs: php-src(PHP_5_3) /ext/gmp gmp.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-48182@lists.php.net to get a copy of this message
iliaa Wed Jan 30 18:25:51 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/gmp gmp.c Log: Fixed bug #43981 (gmp_div_r() does not preserve the sign of 1st argument) http://cvs.php.net/viewvc.cgi/php-src/ext/gmp/gmp.c?r1=1.49.2.2.2.11.2.8&r2=1.49.2.2.2.11.2.9&diff_format=u Index: php-src/ext/gmp/gmp.c diff -u php-src/ext/gmp/gmp.c:1.49.2.2.2.11.2.8 php-src/ext/gmp/gmp.c:1.49.2.2.2.11.2.9 --- php-src/ext/gmp/gmp.c:1.49.2.2.2.11.2.8 Mon Dec 31 07:17:08 2007 +++ php-src/ext/gmp/gmp.c Wed Jan 30 18:25:51 2008 @@ -569,6 +569,9 @@ if (use_ui && gmp_ui_op) { if (allow_ui_return) { long_result = gmp_ui_op(*gmpnum_result, *gmpnum_a, (unsigned long)Z_LVAL_PP(b_arg)); + if (mpz_sgn(*gmpnum_a) == -1) { + long_result = -long_result; + } } else { gmp_ui_op(*gmpnum_result, *gmpnum_a, (unsigned long)Z_LVAL_PP(b_arg)); }

« previous php.cvs (#48182) next »