summaryrefslogtreecommitdiff
path: root/ext/gmp/gmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/gmp/gmp.c')
-rw-r--r--ext/gmp/gmp.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/ext/gmp/gmp.c b/ext/gmp/gmp.c
index 3e723e6f4f..e97977a77c 100644
--- a/ext/gmp/gmp.c
+++ b/ext/gmp/gmp.c
@@ -260,6 +260,11 @@ ZEND_BEGIN_ARG_INFO(arginfo_gmp_scan1, 0)
ZEND_ARG_INFO(0, start)
ZEND_END_ARG_INFO()
+static
+ZEND_BEGIN_ARG_INFO(arginfo_gmp_nextprime, 0)
+ ZEND_ARG_INFO(0, a)
+ZEND_END_ARG_INFO()
+
/* }}} */
ZEND_DECLARE_MODULE_GLOBALS(gmp)
@@ -307,6 +312,7 @@ zend_function_entry gmp_functions[] = {
ZEND_FE(gmp_scan1, arginfo_gmp_scan1)
ZEND_FE(gmp_popcount, arginfo_gmp_popcount)
ZEND_FE(gmp_hamdist, arginfo_gmp_hamdist)
+ ZEND_FE(gmp_nextprime, arginfo_gmp_nextprime)
{NULL, NULL, NULL} /* Must be the last line in gmp_functions[] */
};
/* }}} */
@@ -1424,6 +1430,14 @@ ZEND_FUNCTION(gmp_com)
}
/* }}} */
+/* {{{ 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)