Back to index

php5  5.3.10
php_gmp.h
Go to the documentation of this file.
00001 /*
00002    +----------------------------------------------------------------------+
00003    | PHP Version 5                                                        |
00004    +----------------------------------------------------------------------+
00005    | Copyright (c) 1997-2012 The PHP Group                                |
00006    +----------------------------------------------------------------------+
00007    | This source file is subject to version 3.01 of the PHP license,      |
00008    | that is bundled with this package in the file LICENSE, and is        |
00009    | available through the world-wide-web at the following url:           |
00010    | http://www.php.net/license/3_01.txt                                  |
00011    | If you did not receive a copy of the PHP license and are unable to   |
00012    | obtain it through the world-wide-web, please send a note to          |
00013    | license@php.net so we can mail you a copy immediately.               |
00014    +----------------------------------------------------------------------+
00015    | Author: Stanislav Malyshev <stas@php.net>                            |
00016    +----------------------------------------------------------------------+
00017  */
00018 
00019 #ifndef PHP_GMP_H
00020 #define PHP_GMP_H
00021 
00022 #if HAVE_GMP
00023 
00024 #include <gmp.h>
00025 
00026 extern zend_module_entry gmp_module_entry;
00027 #define phpext_gmp_ptr &gmp_module_entry
00028 
00029 ZEND_MODULE_STARTUP_D(gmp);
00030 ZEND_MODULE_DEACTIVATE_D(gmp);
00031 ZEND_MODULE_INFO_D(gmp);
00032 
00033 ZEND_FUNCTION(gmp_init);
00034 ZEND_FUNCTION(gmp_intval);
00035 ZEND_FUNCTION(gmp_strval);
00036 ZEND_FUNCTION(gmp_add);
00037 ZEND_FUNCTION(gmp_sub);
00038 ZEND_FUNCTION(gmp_mul);
00039 ZEND_FUNCTION(gmp_div_qr);
00040 ZEND_FUNCTION(gmp_div_q);
00041 ZEND_FUNCTION(gmp_div_r);
00042 ZEND_FUNCTION(gmp_mod);
00043 ZEND_FUNCTION(gmp_divexact);
00044 ZEND_FUNCTION(gmp_neg);
00045 ZEND_FUNCTION(gmp_abs);
00046 ZEND_FUNCTION(gmp_fact);
00047 ZEND_FUNCTION(gmp_sqrt);
00048 ZEND_FUNCTION(gmp_pow);
00049 ZEND_FUNCTION(gmp_powm);
00050 ZEND_FUNCTION(gmp_sqrtrem);
00051 ZEND_FUNCTION(gmp_perfect_square);
00052 ZEND_FUNCTION(gmp_prob_prime);
00053 ZEND_FUNCTION(gmp_gcd);
00054 ZEND_FUNCTION(gmp_gcdext);
00055 ZEND_FUNCTION(gmp_invert);
00056 ZEND_FUNCTION(gmp_jacobi);
00057 ZEND_FUNCTION(gmp_legendre);
00058 ZEND_FUNCTION(gmp_cmp);
00059 ZEND_FUNCTION(gmp_sign);
00060 ZEND_FUNCTION(gmp_and);
00061 ZEND_FUNCTION(gmp_or);
00062 ZEND_FUNCTION(gmp_com);
00063 ZEND_FUNCTION(gmp_xor);
00064 ZEND_FUNCTION(gmp_random);
00065 ZEND_FUNCTION(gmp_setbit);
00066 ZEND_FUNCTION(gmp_clrbit);
00067 ZEND_FUNCTION(gmp_scan0);
00068 ZEND_FUNCTION(gmp_scan1);
00069 ZEND_FUNCTION(gmp_testbit);
00070 ZEND_FUNCTION(gmp_popcount);
00071 ZEND_FUNCTION(gmp_hamdist);
00072 ZEND_FUNCTION(gmp_nextprime);
00073 
00074 ZEND_BEGIN_MODULE_GLOBALS(gmp)
00075        zend_bool rand_initialized;
00076        gmp_randstate_t rand_state;
00077 ZEND_END_MODULE_GLOBALS(gmp)
00078 
00079 #ifdef ZTS
00080 #define GMPG(v) TSRMG(gmp_globals_id, zend_gmp_globals *, v)
00081 #else
00082 #define GMPG(v) (gmp_globals.v)
00083 #endif
00084 
00085 #else
00086 
00087 #define phpext_gmp_ptr NULL
00088 
00089 #endif
00090 
00091 #endif /* PHP_GMP_H */
00092 
00093 
00094 /*
00095  * Local variables:
00096  * tab-width: 4
00097  * c-basic-offset: 4
00098  * End:
00099  */