summaryrefslogtreecommitdiff
path: root/ext/dom/php_dom.h
diff options
context:
space:
mode:
Diffstat (limited to 'ext/dom/php_dom.h')
-rw-r--r--ext/dom/php_dom.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/ext/dom/php_dom.h b/ext/dom/php_dom.h
index 8f6eba12c0..628a19e978 100644
--- a/ext/dom/php_dom.h
+++ b/ext/dom/php_dom.h
@@ -68,18 +68,22 @@ extern zend_module_entry dom_module_entry;
#define DOM_NODESET XML_XINCLUDE_START
typedef struct _dom_xpath_object {
- zend_object std;
- void *ptr;
- php_libxml_ref_obj *document;
- HashTable *prop_handler;
- //??? zend_object_handle handle;
int registerPhpFunctions;
HashTable *registered_phpfunctions;
HashTable *node_list;
+ dom_object dom;
} dom_xpath_object;
+static inline dom_xpath_object *php_xpath_obj_from_obj(zend_object *obj) {
+ return (dom_xpath_object*)((char*)(obj)
+ - XtOffsetOf(dom_xpath_object, dom) - XtOffsetOf(dom_object, std));
+}
+
+#define Z_XPATHOBJ_P(zv) php_xpath_obj_from_obj(Z_OBJ_P((zv)))
+
typedef struct _dom_nnodemap_object {
dom_object *baseobj;
+ zval baseobj_zv;
int nodetype;
xmlHashTable *ht;
xmlChar *local;