xref: /ext-ds/php_ds.h (revision daf9b1ec)
1 #ifndef PHP_DS_H
2 #define PHP_DS_H
3 
4 #include <stdbool.h>
5 
6 #include "php.h"
7 #include "main/php.h"
8 #include "zend_exceptions.h"
9 #include "zend_interfaces.h"
10 #include "zend_operators.h"
11 #include "ext/standard/info.h"
12 #include "ext/standard/php_var.h"
13 #include "ext/spl/spl_iterators.h"
14 #include "ext/spl/spl_exceptions.h"
15 #include "zend_smart_str.h"
16 #include "ext/json/php_json.h"
17 
18 extern zend_module_entry ds_module_entry;
19 
20 #define phpext_ds_ptr &ds_module_entry
21 
22 /* Replace with version number for your extension */
23 #define PHP_DS_VERSION "1.5.0"
24 
25 #ifdef PHP_WIN32
26 #  define PHP_API __declspec(dllexport)
27 #elif defined(__GNUC__) && __GNUC__ >= 4
28 #  define PHP_API __attribute__ ((visibility("default")))
29 #else
30 #  define PHP_API
31 #endif
32 
33 #ifdef ZTS
34 #include "TSRM.h"
35 #endif
36 
37 ZEND_BEGIN_MODULE_GLOBALS(ds)
38 zend_fcall_info        user_compare_fci;
39 zend_fcall_info_cache  user_compare_fci_cache;
40 ZEND_END_MODULE_GLOBALS(ds)
41 
42 #ifdef ZTS
43 #define DSG(v) TSRMG(ds_globals_id, zend_ds_globals *, v)
44 #else
45 #define DSG(v) (ds_globals.v)
46 #endif
47 
48 ZEND_EXTERN_MODULE_GLOBALS(ds);
49 
50 #if defined(ZTS) && defined(COMPILE_DL_DS)
51 ZEND_TSRMLS_CACHE_EXTERN();
52 #endif
53 
54 #endif
55