xref: /PHP-7.0/ext/skeleton/php_skeleton.h (revision 1ac15293)
1 /* __header_here__ */
2 
3 #ifndef PHP_EXTNAME_H
4 #define PHP_EXTNAME_H
5 
6 extern zend_module_entry extname_module_entry;
7 #define phpext_extname_ptr &extname_module_entry
8 
9 #define PHP_EXTNAME_VERSION "0.1.0" /* Replace with version number for your extension */
10 
11 #ifdef PHP_WIN32
12 #	define PHP_EXTNAME_API __declspec(dllexport)
13 #elif defined(__GNUC__) && __GNUC__ >= 4
14 #	define PHP_EXTNAME_API __attribute__ ((visibility("default")))
15 #else
16 #	define PHP_EXTNAME_API
17 #endif
18 
19 #ifdef ZTS
20 #include "TSRM.h"
21 #endif
22 
23 /*
24   	Declare any global variables you may need between the BEGIN
25 	and END macros here:
26 
27 ZEND_BEGIN_MODULE_GLOBALS(extname)
28 	zend_long  global_value;
29 	char *global_string;
30 ZEND_END_MODULE_GLOBALS(extname)
31 */
32 
33 /* Always refer to the globals in your function as EXTNAME_G(variable).
34    You are encouraged to rename these macros something shorter, see
35    examples in any other php module directory.
36 */
37 #define EXTNAME_G(v) ZEND_MODULE_GLOBALS_ACCESSOR(extname, v)
38 
39 #if defined(ZTS) && defined(COMPILE_DL_EXTNAME)
40 ZEND_TSRMLS_CACHE_EXTERN()
41 #endif
42 
43 #endif	/* PHP_EXTNAME_H */
44 
45 /* __footer_here__ */
46