php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
php_gmp_int.h
Go to the documentation of this file.
1/* interface header; needs to be installed; FIXME rename? */
2
3#ifndef incl_PHP_GMP_INT_H
4#define incl_PHP_GMP_INT_H
5
6#ifdef HAVE_CONFIG_H
7#include <config.h>
8#endif
9
10#include "php.h"
11#include <gmp.h>
12
13#ifdef PHP_WIN32
14# define PHP_GMP_API __declspec(dllexport)
15#elif defined(__GNUC__) && __GNUC__ >= 4
16# define PHP_GMP_API __attribute__ ((visibility("default")))
17#else
18# define PHP_GMP_API
19#endif
20
25
26static inline gmp_object *php_gmp_object_from_zend_object(zend_object *zobj) {
27 return (gmp_object *)( ((char *)zobj) - XtOffsetOf(gmp_object, std) );
28}
29
31
32/* GMP and MPIR use different datatypes on different platforms */
33#ifdef _WIN64
34typedef zend_long gmp_long;
35typedef zend_ulong gmp_ulong;
36#else
37typedef long gmp_long;
38typedef unsigned long gmp_ulong;
39#endif
40
41#endif
long gmp_long
Definition php_gmp_int.h:37
unsigned long gmp_ulong
Definition php_gmp_int.h:38
struct _gmp_object gmp_object
#define PHP_GMP_API
Definition php_gmp_int.h:18
PHP_GMP_API zend_class_entry * php_gmp_class_entry(void)
Definition gmp.c:88
zend_object std
Definition php_gmp_int.h:23
int32_t zend_long
Definition zend_long.h:42
uint32_t zend_ulong
Definition zend_long.h:43
#define XtOffsetOf(s_type, field)
struct _zend_class_entry zend_class_entry
struct _zend_object zend_object
zend_object * zobj