summaryrefslogtreecommitdiff
path: root/ext/libxml/php_libxml.h
diff options
context:
space:
mode:
authorAaron Piotrowski <aaron@trowski.com>2016-06-10 22:02:23 -0500
committerAaron Piotrowski <aaron@trowski.com>2016-06-10 22:02:23 -0500
commite3c681aa5cc71122a8d2fae42e6513fc413ccac8 (patch)
tree5f1df62f7b666028edb0ee1adf083a52d63df45a /ext/libxml/php_libxml.h
parentfb4e3085cbaa76eb8f28eebf848a81d1c0190067 (diff)
parent792e89385ca6fc722a03590722eb7745a2374720 (diff)
downloadphp-git-e3c681aa5cc71122a8d2fae42e6513fc413ccac8.tar.gz
Merge branch 'master' into throw-error-in-extensions
Diffstat (limited to 'ext/libxml/php_libxml.h')
-rw-r--r--ext/libxml/php_libxml.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/ext/libxml/php_libxml.h b/ext/libxml/php_libxml.h
index 5a68a57494..11fca74938 100644
--- a/ext/libxml/php_libxml.h
+++ b/ext/libxml/php_libxml.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -86,7 +86,7 @@ typedef struct _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));
+ return (php_libxml_node_object *)((char*)(obj) - obj->handlers->offset);
}
#define Z_LIBXML_NODE_P(zv) php_libxml_node_fetch_object(Z_OBJ_P((zv)))
@@ -115,13 +115,10 @@ PHP_LIBXML_API zend_bool php_libxml_disable_entity_loader(zend_bool disable);
PHP_LIBXML_API void php_libxml_initialize(void);
PHP_LIBXML_API void php_libxml_shutdown(void);
-#ifdef ZTS
-#define LIBXML(v) ZEND_TSRMG(libxml_globals_id, zend_libxml_globals *, v)
-#ifdef COMPILE_DL_LIBXML
-ZEND_TSRMLS_CACHE_EXTERN();
-#endif
-#else
-#define LIBXML(v) (libxml_globals.v)
+#define LIBXML(v) ZEND_MODULE_GLOBALS_ACCESSOR(libxml, v)
+
+#if defined(ZTS) && defined(COMPILE_DL_LIBXML)
+ZEND_TSRMLS_CACHE_EXTERN()
#endif
#else /* HAVE_LIBXML */