summaryrefslogtreecommitdiff
path: root/include/extension.h
diff options
context:
space:
mode:
authorEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2013-08-31 15:41:04 -0700
committerEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2013-08-31 15:41:04 -0700
commitd762ee103bee45bcd18df457c2c7a9f36991c75f (patch)
treebd8937a36a205a8755ac485c4ede65c10078b375 /include/extension.h
parent708e9cf9da9571a38ac8d2529d016cd78ce8ec54 (diff)
Work in progress on a simpler api
Diffstat (limited to 'include/extension.h')
-rw-r--r--include/extension.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/include/extension.h b/include/extension.h
index daff45e..1962fd7 100644
--- a/include/extension.h
+++ b/include/extension.h
@@ -17,7 +17,11 @@
* @author Emiel Bruijntjes <emiel.bruijntjes@copernica.com>
* @copyright 2013 Copernica BV
*/
-#include <php5/Zend/zend_modules.h>
+
+/**
+ * Structures referenced in this class
+ */
+struct _zend_module_entry;
/**
* Set up namespace
@@ -47,7 +51,7 @@ public:
/**
* Destructor
*/
- virtual ~Extension() {}
+ virtual ~Extension() { delete _entry; }
/**
* Initialize the extension.
@@ -141,9 +145,14 @@ public:
private:
/**
* 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;
+ _zend_module_entry *_entry;
};