tony2001 Mon Apr 3 17:46:12 2006 UTC
Modified files:
/php-src NEWS
/php-src/ext/gmp gmp.c php_gmp.h
Log:
add gmp_nextprime() function
patch by ants dot aasma at gmail dot com
http://cvs.php.net/viewcvs.cgi/php-src/NEWS?r1=1.2111&r2=1.2112&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2111 php-src/NEWS:1.2112
--- php-src/NEWS:1.2111 Mon Mar 27 07:35:05 2006
+++ php-src/NEWS Mon Apr 3 17:46:12 2006
@@ -28,6 +28,7 @@
- Changed "instanceof" and "catch" operators, is_a() and is_subclass_of()
functions to not call __autoload(). (Dmitry)
- Removed global reflection constants. (Johannes)
+- Added gmp_nextprime() function. (Tony, patch by ants dot aasma at gmail dot
com)
- Added "allow_url_include" ini directive to be able to turn off remote url
code execution separately from the "allow_url_fopen" setting. (Rasmus)
- Added to cURL extension: (Ilia)
http://cvs.php.net/viewcvs.cgi/php-src/ext/gmp/gmp.c?r1=1.51&r2=1.52&diff_format=u
Index: php-src/ext/gmp/gmp.c
diff -u php-src/ext/gmp/gmp.c:1.51 php-src/ext/gmp/gmp.c:1.52
--- php-src/ext/gmp/gmp.c:1.51 Sun Jan 1 13:09:50 2006
+++ php-src/ext/gmp/gmp.c Mon Apr 3 17:46:12 2006
@@ -79,6 +79,7 @@
ZEND_FE(gmp_scan1, NULL)
ZEND_FE(gmp_popcount, NULL)
ZEND_FE(gmp_hamdist, NULL)
+ ZEND_FE(gmp_nextprime, NULL)
{NULL, NULL, NULL} /* Must be the last line in gmp_functions[] */
};
/* }}} */
@@ -1199,6 +1200,14 @@
}
/* }}} */
+/* {{{ proto resource gmp_nextprime(resource a)
+ Finds next prime of a */
+ZEND_FUNCTION(gmp_nextprime)
+{
+ gmp_unary_op(mpz_nextprime);
+}
+/* }}} */
+
/* {{{ proto resource gmp_xor(resource a, resource b)
Calculates logical exclusive OR of a and b */
ZEND_FUNCTION(gmp_xor)
http://cvs.php.net/viewcvs.cgi/php-src/ext/gmp/php_gmp.h?r1=1.13&r2=1.14&diff_format=u
Index: php-src/ext/gmp/php_gmp.h
diff -u php-src/ext/gmp/php_gmp.h:1.13 php-src/ext/gmp/php_gmp.h:1.14
--- php-src/ext/gmp/php_gmp.h:1.13 Sun Jan 1 13:09:50 2006
+++ php-src/ext/gmp/php_gmp.h Mon Apr 3 17:46:12 2006
@@ -75,6 +75,7 @@
ZEND_FUNCTION(gmp_scan1);
ZEND_FUNCTION(gmp_popcount);
ZEND_FUNCTION(gmp_hamdist);
+ZEND_FUNCTION(gmp_nextprime);
ZEND_BEGIN_MODULE_GLOBALS(gmp)
zend_bool rand_initialized;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php