diff options
author | Sara Golemon <pollita@php.net> | 2017-10-02 17:26:05 -0400 |
---|---|---|
committer | Sara Golemon <pollita@php.net> | 2017-10-09 13:23:10 -0400 |
commit | e05cba0806fed049854d3569401935a524861750 (patch) | |
tree | c4cbb003eabaa24da9d8faf20f5d087a600ee646 /ext/gmp/php_gmp.h | |
parent | 39ded1d5f85ca3358cc8a52bb37e72a5eb5ce0db (diff) | |
download | php-git-e05cba0806fed049854d3569401935a524861750.tar.gz |
Make GMP more usable by third-party extensions.
Export a PHPAPI function to return gmp_ce (and make the actual storage static).
Provide gmp_object struct in header w/ inline accessor.
Install php_gmp_int.h header.
Remove unnecessary `#ifdef HAVE_GMP` checks.
Diffstat (limited to 'ext/gmp/php_gmp.h')
-rw-r--r-- | ext/gmp/php_gmp.h | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/ext/gmp/php_gmp.h b/ext/gmp/php_gmp.h index 903c68ee5e..971d6593ec 100644 --- a/ext/gmp/php_gmp.h +++ b/ext/gmp/php_gmp.h @@ -19,8 +19,6 @@ #ifndef PHP_GMP_H #define PHP_GMP_H -#if HAVE_GMP - #include <gmp.h> extern zend_module_entry gmp_module_entry; @@ -81,15 +79,6 @@ ZEND_FUNCTION(gmp_popcount); ZEND_FUNCTION(gmp_hamdist); ZEND_FUNCTION(gmp_nextprime); -/* GMP and MPIR use different datatypes on different platforms */ -#ifdef PHP_WIN32 -typedef zend_long gmp_long; -typedef zend_ulong gmp_ulong; -#else -typedef long gmp_long; -typedef unsigned long gmp_ulong; -#endif - ZEND_BEGIN_MODULE_GLOBALS(gmp) zend_bool rand_initialized; gmp_randstate_t rand_state; @@ -101,12 +90,6 @@ ZEND_END_MODULE_GLOBALS(gmp) ZEND_TSRMLS_CACHE_EXTERN() #endif -#else - -#define phpext_gmp_ptr NULL - -#endif - #endif /* PHP_GMP_H */ |