diff options
author | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-03-01 10:32:26 +0100 |
---|---|---|
committer | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-03-01 10:32:26 +0100 |
commit | c8d1519f31baed0fb399dac9333e48e2f9e910ad (patch) | |
tree | 1e2192f0b91d55512d26f4a14c8eae6b5a1f6ece /src/function.h | |
parent | 73945a9cb2b096a5379d17c028bda102b87aedce (diff) |
namespace implementation, compile issue for php 5.4 and higher
Diffstat (limited to 'src/function.h')
-rw-r--r-- | src/function.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/function.h b/src/function.h index 84d7dcc..40c392f 100644 --- a/src/function.h +++ b/src/function.h @@ -50,6 +50,20 @@ public: } } + /** + * Fill a function entry + * @param prefix Active namespace prefix + * @param entry Entry to be filled + */ + void initialize(const std::string &prefix, struct _zend_function_entry *entry) + { + // if there is a namespace prefix, we should adjust the name + if (prefix.size()) _ptr = HiddenPointer<Callable>(this, prefix+"\\"+(const char *)_ptr); + + // call base initialize + Callable::initialize(entry); + } + private: /** * Union of supported callbacks |