diff options
author | Xinchen Hui <laruence@gmail.com> | 2014-05-04 11:46:17 +0800 |
---|---|---|
committer | Xinchen Hui <laruence@gmail.com> | 2014-05-04 11:46:17 +0800 |
commit | 41f68894366e1156191387034fc53286d9fec747 (patch) | |
tree | 30507069886d64f71c5b287c57e8bbb89c79d2f4 /ext/libxml/php_libxml.h | |
parent | f3ccbb3c403c098dbf273f1e8122d79617034ca0 (diff) | |
download | php-git-41f68894366e1156191387034fc53286d9fec747.tar.gz |
Fixed SimpleXMl build with DOM
Diffstat (limited to 'ext/libxml/php_libxml.h')
-rw-r--r-- | ext/libxml/php_libxml.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ext/libxml/php_libxml.h b/ext/libxml/php_libxml.h index 246994ddf8..b79ca17556 100644 --- a/ext/libxml/php_libxml.h +++ b/ext/libxml/php_libxml.h @@ -81,6 +81,13 @@ typedef struct _php_libxml_node_object { zend_object std; } php_libxml_node_object; + +static inline php_libxml_node_object *php_libxml_node_fetch_object(zend_object *obj) { + return (php_libxml_node_object *)((char*)(obj) - XtOffsetOf(php_libxml_node_object, std)); +} + +#define Z_LIBXML_NODE_P(zv) php_libxml_node_fetch_object(Z_OBJ_P((zv))) + typedef void * (*php_libxml_export_node) (zval *object TSRMLS_DC); PHP_LIBXML_API int php_libxml_increment_node_ptr(php_libxml_node_object *object, xmlNodePtr node, void *private_data TSRMLS_DC); |