diff options
author | Stanley Sufficool <ssufficool@php.net> | 2014-10-20 21:33:32 -0700 |
---|---|---|
committer | Stanley Sufficool <ssufficool@php.net> | 2014-10-20 21:33:32 -0700 |
commit | 8defcb855ab01d9c8ab4759cb793d80149b55a8c (patch) | |
tree | ed51eb30a2cbc92b102557498fb3e4113da1bb07 /ext/libxml/php_libxml.h | |
parent | 9c7dbb0487f5991fde03873ea8f5e66d6688415f (diff) | |
parent | baddb1c73a170ef1d2c31bd54cddbc6e1ab596b9 (diff) | |
download | php-git-8defcb855ab01d9c8ab4759cb793d80149b55a8c.tar.gz |
Merge branch 'master' of https://git.php.net/push/php-src
* 'master' of https://git.php.net/push/php-src: (6215 commits)
Extra comma
Moved proxy object support in ASSIGN_ADD (and family) from VM to slow paths of corresponding operators
Simplification
zend_get_property_info_quick() cleanup and optimization
initialize lineno before calling compile file file in phar
Use ADDREF instead of DUP, it must be enough.
Removed old irrelevant comment
fixed compilation error
Fix bug #68262: Broken reference across cloned objects
export functions needed for phpdbg
Fixed compilation
Optimized property access handlers. Removed EG(std_property_info).
Fixed bug #68199 (PDO::pgsqlGetNotify doesn't support NOTIFY payloads)
Don't make difference between undefined and unaccessible properies when call __get() and family
Don't make useless CSE
array_pop/array_shift optimization
check for zlib headers as well as lib for mysqlnd
a realpath cache key can be int or float, catching this
News entry for new curl constants
News entry for new curl constants
...
Diffstat (limited to 'ext/libxml/php_libxml.h')
-rw-r--r-- | ext/libxml/php_libxml.h | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/ext/libxml/php_libxml.h b/ext/libxml/php_libxml.h index 04f8b4933b..cccc83f8db 100644 --- a/ext/libxml/php_libxml.h +++ b/ext/libxml/php_libxml.h @@ -1,8 +1,8 @@ /* +----------------------------------------------------------------------+ - | PHP Version 5 | + | PHP Version 7 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2013 The PHP Group | + | Copyright (c) 1997-2014 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 | @@ -34,16 +34,17 @@ extern zend_module_entry libxml_module_entry; # define PHP_LIBXML_API #endif -#include "ext/standard/php_smart_str.h" +#include "zend_smart_str.h" #include <libxml/tree.h> #define LIBXML_SAVE_NOEMPTYTAG 1<<2 ZEND_BEGIN_MODULE_GLOBALS(libxml) - zval *stream_context; + zval stream_context; smart_str error_buffer; zend_llist *error_list; struct _php_libxml_entity_resolver { + zval object; zend_fcall_info fci; zend_fcall_info_cache fcc; } entity_loader; @@ -74,12 +75,19 @@ typedef struct _php_libxml_node_ptr { } php_libxml_node_ptr; typedef struct _php_libxml_node_object { - zend_object std; php_libxml_node_ptr *node; php_libxml_ref_obj *document; HashTable *properties; + 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); @@ -87,7 +95,7 @@ PHP_LIBXML_API int php_libxml_decrement_node_ptr(php_libxml_node_object *object PHP_LIBXML_API int php_libxml_increment_doc_ref(php_libxml_node_object *object, xmlDocPtr docp TSRMLS_DC); PHP_LIBXML_API int php_libxml_decrement_doc_ref(php_libxml_node_object *object TSRMLS_DC); PHP_LIBXML_API xmlNodePtr php_libxml_import_node(zval *object TSRMLS_DC); -PHP_LIBXML_API int php_libxml_register_export(zend_class_entry *ce, php_libxml_export_node export_function); +PHP_LIBXML_API zval *php_libxml_register_export(zend_class_entry *ce, php_libxml_export_node export_function); /* When an explicit freeing of node and children is required */ PHP_LIBXML_API void php_libxml_node_free_resource(xmlNodePtr node TSRMLS_DC); /* When object dtor is called as node may still be referenced */ @@ -96,7 +104,7 @@ PHP_LIBXML_API void php_libxml_error_handler(void *ctx, const char *msg, ...); PHP_LIBXML_API void php_libxml_ctx_warning(void *ctx, const char *msg, ...); PHP_LIBXML_API void php_libxml_ctx_error(void *ctx, const char *msg, ...); PHP_LIBXML_API int php_libxml_xmlCheckUTF8(const unsigned char *s); -PHP_LIBXML_API zval *php_libxml_switch_context(zval *context TSRMLS_DC); +PHP_LIBXML_API void php_libxml_switch_context(zval *context, zval *oldcontext TSRMLS_DC); PHP_LIBXML_API void php_libxml_issue_error(int level, const char *msg TSRMLS_DC); PHP_LIBXML_API zend_bool php_libxml_disable_entity_loader(zend_bool disable TSRMLS_DC); |