tony2001 Thu Apr 19 09:36:34 2007 UTC
Modified files:
/php-src/ext/gmp gmp.c
/php-src/ext/gmp/tests 022.phpt
Log:
fix gmp_gcdext() in Unicode mode
http://cvs.php.net/viewvc.cgi/php-src/ext/gmp/gmp.c?r1=1.61&r2=1.62&diff_format=u
Index: php-src/ext/gmp/gmp.c
diff -u php-src/ext/gmp/gmp.c:1.61 php-src/ext/gmp/gmp.c:1.62
--- php-src/ext/gmp/gmp.c:1.61 Wed Apr 18 20:53:21 2007
+++ php-src/ext/gmp/gmp.c Thu Apr 19 09:36:34 2007
@@ -1271,11 +1271,11 @@
array_init(return_value);
ZEND_REGISTER_RESOURCE(&r, gmpnum_g, le_gmp);
- add_assoc_resource(return_value, "g", Z_LVAL(r));
+ add_ascii_assoc_resource(return_value, "g", Z_LVAL(r));
ZEND_REGISTER_RESOURCE(&r, gmpnum_s, le_gmp);
- add_assoc_resource(return_value, "s", Z_LVAL(r));
+ add_ascii_assoc_resource(return_value, "s", Z_LVAL(r));
ZEND_REGISTER_RESOURCE(&r, gmpnum_t, le_gmp);
- add_assoc_resource(return_value, "t", Z_LVAL(r));
+ add_ascii_assoc_resource(return_value, "t", Z_LVAL(r));
}
/* }}} */
http://cvs.php.net/viewvc.cgi/php-src/ext/gmp/tests/022.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/gmp/tests/022.phpt
diff -u php-src/ext/gmp/tests/022.phpt:1.1 php-src/ext/gmp/tests/022.phpt:1.2
--- php-src/ext/gmp/tests/022.phpt:1.1 Wed Apr 18 21:04:05 2007
+++ php-src/ext/gmp/tests/022.phpt Thu Apr 19 09:36:34 2007
@@ -81,3 +81,50 @@
Warning: Wrong parameter count for gmp_gcdext() in %s on line %d
NULL
Done
+--UEXPECTF--
+unicode(1) "3"
+unicode(2) "-4"
+unicode(2) "11"
+unicode(1) "1"
+unicode(4) "-805"
+unicode(3) "359"
+unicode(1) "3"
+unicode(2) "32"
+unicode(5) "-2257"
+unicode(4) "3003"
+unicode(3) "-10"
+unicode(2) "19"
+unicode(1) "2"
+unicode(2) "67"
+unicode(2) "-3"
+unicode(2) "15"
+unicode(7) "-601519"
+unicode(1) "6"
+unicode(3) "345"
+unicode(1) "1"
+unicode(1) "0"
+unicode(1) "1"
+unicode(5) "84319"
+unicode(9) "-84241831"
+unicode(1) "1"
+unicode(13) "-156252240050"
+unicode(14) "16689072773537"
+unicode(3) "195"
+unicode(11) "46994884483"
+unicode(9) "-68772552"
+
+Warning: gmp_gcdext(): Unable to convert variable to GMP - wrong type in %s on
line %d
+bool(false)
+
+Warning: gmp_gcdext(): Unable to convert variable to GMP - wrong type in %s on
line %d
+bool(false)
+
+Warning: Wrong parameter count for gmp_gcdext() in %s on line %d
+NULL
+
+Warning: Wrong parameter count for gmp_gcdext() in %s on line %d
+NULL
+
+Warning: Wrong parameter count for gmp_gcdext() in %s on line %d
+NULL
+Done
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php