diff options
author | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2013-08-24 19:44:19 +0200 |
---|---|---|
committer | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2013-08-24 19:44:19 +0200 |
commit | b8a14d96c06d5a8910cb28d28870f0036ae6a461 (patch) | |
tree | 5077e7af0a04ce093dded091747c047b1ad05478 /phpcpp.h | |
parent | d29c1a960798bbfa351b1aa3426d6f0a79ffe92c (diff) |
The extension::initialize() and extension::finalize() methods are called at the appropriate time
Diffstat (limited to 'phpcpp.h')
-rw-r--r-- | phpcpp.h | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -12,4 +12,17 @@ */ #include <phpcpp/extension.h> +/** + * Macro to export a function + */ +#if defined(__GNUC__) && __GNUC__ >= 4 +# define PHPCPP_EXPORT __attribute__ ((visibility("default"))) +#else +# define PHPCPP_EXPORT +#endif + +/** + * Macro to activate the extension + */ +#define PHP_CPP_EXTENSION(classname) extern "C" { PHPCPP_EXPORT void *get_module() { static classname extension; return extension.entry(); } } |