diff options
author | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-04-10 11:36:44 +0200 |
---|---|---|
committer | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-04-10 11:36:44 +0200 |
commit | f0dec5907bd49bb468089b0fe50d8cbf2979272e (patch) | |
tree | f6ca989d6233cfc591efe07660e6dbb774d5f505 /zend/namespace.cpp | |
parent | ec2ee67b805b3f431db4ce2f9cdfc8d74aadfe35 (diff) | |
parent | 3119060c9c8905b9d07e04a342a2c32cf0bf1358 (diff) |
Merge pull request #76 from valmat/ini
Implemented issue # 64
Diffstat (limited to 'zend/namespace.cpp')
-rw-r--r-- | zend/namespace.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/zend/namespace.cpp b/zend/namespace.cpp index 2b4b62a..8b97c52 100644 --- a/zend/namespace.cpp +++ b/zend/namespace.cpp @@ -128,6 +128,21 @@ void Namespace::classes(const std::function<void(const std::string &ns, ClassBas } /** + * Filling ini entries into external zend_ini_entry array + * @param zend_ini_entry* + */ +void Namespace::fill_ini(zend_ini_entry *ini_entries, int module_number) +{ + // loop through the ini entries + unsigned int Ind = 0; + for (auto &ini : _ini_entries) ini->fill(&ini_entries[Ind++], module_number); + + // add last empty ini entry (Zend, for some reason, it requires) + zend_ini_entry empty_entry { 0, 0, nullptr, 0, nullptr, nullptr, nullptr, nullptr, nullptr, 0, nullptr, 0, 0, 0, nullptr }; + ini_entries[Ind] = empty_entry; +} + +/** * End namespace */ } |