diff options
author | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-05-06 09:34:12 +0200 |
---|---|---|
committer | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-05-06 09:34:12 +0200 |
commit | f57607d2d58f6e7689a3550c84ba68ce42c6a7b3 (patch) | |
tree | 318f5d63d51106fb34cd6634f7cc8e321da1c1e0 /zend/extensionimpl.h | |
parent | 927e54ecde25ed7ba718697631dc8ffd208e361a (diff) |
When "apache reload" is called, the PHP-CPP library made the entire Apache process crash. This has been fixed
Diffstat (limited to 'zend/extensionimpl.h')
-rw-r--r-- | zend/extensionimpl.h | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/zend/extensionimpl.h b/zend/extensionimpl.h index ba3e6c8..0e9a289 100644 --- a/zend/extensionimpl.h +++ b/zend/extensionimpl.h @@ -20,16 +20,18 @@ class ExtensionImpl : public ExtensionBase protected: /** * The information that is passed to the Zend engine - * - * Although it would be slightly faster to not make this a pointer, this - * would require that client code also includes the PHP header files, which - * we try to prevent with the PHP-CPP library, so we allocate it dynamically. - * * @var zend_module_entry */ zend_module_entry _entry; /** + * Is the object locked? This prevents crashes for 'apache reload' + * because we then do not have to re-initialize the entire php engine + * @var bool + */ + bool _locked = false; + + /** * The .ini entries * * @var zend_ini_entry @@ -56,6 +58,17 @@ public: */ virtual ~ExtensionImpl(); + /** + * Is the object locked (true) or is it still possible to add more functions, + * classes and other elements to it? + * @return bool + */ + bool locked() + { + // return member + return _locked; + } + /** * Retrieve the module entry * |