From c081ce628f0d76d44784d7bb8e06428b06142ac0 Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Fri, 3 Jan 2014 11:08:10 +0800 Subject: Bump year --- ext/libxml/php_libxml.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/libxml/php_libxml.h') diff --git a/ext/libxml/php_libxml.h b/ext/libxml/php_libxml.h index 04f8b4933b..901e321aac 100644 --- a/ext/libxml/php_libxml.h +++ b/ext/libxml/php_libxml.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | 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 | -- cgit v1.2.1 From 180de35bce168ff0fd6521b3fd377b56701c5dc6 Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Fri, 11 Apr 2014 18:07:25 +0800 Subject: Refactor libxml (incompleted) --- ext/libxml/php_libxml.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'ext/libxml/php_libxml.h') diff --git a/ext/libxml/php_libxml.h b/ext/libxml/php_libxml.h index 901e321aac..64c6bd7874 100644 --- a/ext/libxml/php_libxml.h +++ b/ext/libxml/php_libxml.h @@ -40,10 +40,11 @@ extern zend_module_entry libxml_module_entry; #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; @@ -87,7 +88,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 +97,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); -- cgit v1.2.1 From a975c7e0fe95a94c119eb1c8e519b2357aa50dcc Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Mon, 14 Apr 2014 19:27:22 +0800 Subject: Refactor simpleXML (compilable, but incompleted) --- ext/libxml/php_libxml.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/libxml/php_libxml.h') diff --git a/ext/libxml/php_libxml.h b/ext/libxml/php_libxml.h index 64c6bd7874..246994ddf8 100644 --- a/ext/libxml/php_libxml.h +++ b/ext/libxml/php_libxml.h @@ -75,10 +75,10 @@ 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; typedef void * (*php_libxml_export_node) (zval *object TSRMLS_DC); -- cgit v1.2.1 From 41f68894366e1156191387034fc53286d9fec747 Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Sun, 4 May 2014 11:46:17 +0800 Subject: Fixed SimpleXMl build with DOM --- ext/libxml/php_libxml.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'ext/libxml/php_libxml.h') 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); -- cgit v1.2.1 From d0cb715373c3fbe9dc095378ec5ed8c71f799f67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Schl=C3=BCter?= Date: Fri, 19 Sep 2014 18:33:14 +0200 Subject: s/PHP 5/PHP 7/ --- ext/libxml/php_libxml.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/libxml/php_libxml.h') diff --git a/ext/libxml/php_libxml.h b/ext/libxml/php_libxml.h index b79ca17556..b06462db28 100644 --- a/ext/libxml/php_libxml.h +++ b/ext/libxml/php_libxml.h @@ -1,6 +1,6 @@ /* +----------------------------------------------------------------------+ - | PHP Version 5 | + | PHP Version 7 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2014 The PHP Group | +----------------------------------------------------------------------+ -- cgit v1.2.1 From e33f3d3b7c9a69fe069484045a27d282aa98b00e Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 20 Sep 2014 22:42:02 +0200 Subject: Move smart_str implementation into Zend/ So we can use it there as well... For now I've retained the zend_smart_str_public.h header, though it would probably be better to just move that one struct into zend_types.h. --- ext/libxml/php_libxml.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/libxml/php_libxml.h') diff --git a/ext/libxml/php_libxml.h b/ext/libxml/php_libxml.h index b06462db28..9518654b5b 100644 --- a/ext/libxml/php_libxml.h +++ b/ext/libxml/php_libxml.h @@ -34,7 +34,7 @@ extern zend_module_entry libxml_module_entry; # define PHP_LIBXML_API #endif -#include "ext/standard/php_smart_str.h" +#include "zend_smart_str_public.h" #include #define LIBXML_SAVE_NOEMPTYTAG 1<<2 -- cgit v1.2.1 From 2a7de9fdbba28152fadcdddc2b731d319405e106 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 21 Sep 2014 20:28:44 +0200 Subject: Rename smart_str_append to smart_str_append_smart_str It's used only rarely and I'm running out of append names... --- ext/libxml/php_libxml.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/libxml/php_libxml.h') diff --git a/ext/libxml/php_libxml.h b/ext/libxml/php_libxml.h index 9518654b5b..cccc83f8db 100644 --- a/ext/libxml/php_libxml.h +++ b/ext/libxml/php_libxml.h @@ -34,7 +34,7 @@ extern zend_module_entry libxml_module_entry; # define PHP_LIBXML_API #endif -#include "zend_smart_str_public.h" +#include "zend_smart_str.h" #include #define LIBXML_SAVE_NOEMPTYTAG 1<<2 -- cgit v1.2.1