2003-06-29 16:07:18 +00:00
|
|
|
/* __header_here__ */
|
|
|
|
|
|
|
|
#ifndef PHP_EXTNAME_H
|
|
|
|
#define PHP_EXTNAME_H
|
|
|
|
|
|
|
|
extern zend_module_entry extname_module_entry;
|
|
|
|
#define phpext_extname_ptr &extname_module_entry
|
|
|
|
|
2013-10-14 12:37:39 +00:00
|
|
|
#define PHP_EXTNAME_VERSION "0.1.0" /* Replace with version number for your extension */
|
|
|
|
|
2003-06-29 16:07:18 +00:00
|
|
|
#ifdef PHP_WIN32
|
2008-01-30 09:41:12 +00:00
|
|
|
# define PHP_EXTNAME_API __declspec(dllexport)
|
|
|
|
#elif defined(__GNUC__) && __GNUC__ >= 4
|
|
|
|
# define PHP_EXTNAME_API __attribute__ ((visibility("default")))
|
2003-06-29 16:07:18 +00:00
|
|
|
#else
|
2008-01-30 09:41:12 +00:00
|
|
|
# define PHP_EXTNAME_API
|
2003-06-29 16:07:18 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef ZTS
|
|
|
|
#include "TSRM.h"
|
|
|
|
#endif
|
|
|
|
|
2015-01-03 09:22:58 +00:00
|
|
|
/*
|
2003-06-29 16:07:18 +00:00
|
|
|
Declare any global variables you may need between the BEGIN
|
2015-01-03 09:22:58 +00:00
|
|
|
and END macros here:
|
2003-06-29 16:07:18 +00:00
|
|
|
|
|
|
|
ZEND_BEGIN_MODULE_GLOBALS(extname)
|
2014-08-25 17:24:55 +00:00
|
|
|
zend_long global_value;
|
2003-06-29 16:07:18 +00:00
|
|
|
char *global_string;
|
|
|
|
ZEND_END_MODULE_GLOBALS(extname)
|
|
|
|
*/
|
|
|
|
|
2014-12-17 11:37:50 +00:00
|
|
|
/* Always refer to the globals in your function as EXTNAME_G(variable).
|
|
|
|
You are encouraged to rename these macros something shorter, see
|
2003-06-29 16:07:18 +00:00
|
|
|
examples in any other php module directory.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifdef ZTS
|
2014-12-17 11:37:50 +00:00
|
|
|
#define EXTNAME_G(v) ZEND_TSRMG(extname_globals_id, zend_extname_globals *, v)
|
|
|
|
#ifdef COMPILE_DL_EXTNAME
|
2015-02-16 16:19:32 +00:00
|
|
|
ZEND_TSRMLS_CACHE_EXTERN();
|
2014-12-17 11:37:50 +00:00
|
|
|
#endif
|
2003-06-29 16:07:18 +00:00
|
|
|
#else
|
|
|
|
#define EXTNAME_G(v) (extname_globals.v)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* PHP_EXTNAME_H */
|
|
|
|
|
|
|
|
/* __footer_here__ */
|