Skip to content

Remove properties field from php_libxml_node_object #13062

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions UPGRADING.INTERNALS
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ PHP 8.4 INTERNALS UPGRADE NOTES
d. ext/libxml
- Added php_libxml_pretend_ctx_error_ex() to emit errors as if they had come
from libxml.
- Removed the "properties" HashTable field from php_libxml_node_object.

e. ext/date
- Added the php_format_date_ex() API to format instances of php_date_obj.
Expand Down
12 changes: 2 additions & 10 deletions ext/libxml/libxml.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,15 +152,6 @@ static void php_libxml_unlink_entity(void *data, void *table, xmlChar *name)
}

/* {{{ internal functions for interoperability */
static int php_libxml_clear_object(php_libxml_node_object *object)
{
if (object->properties) {
object->properties = NULL;
}
php_libxml_decrement_node_ptr(object);
return php_libxml_decrement_doc_ref(object);
}

static void php_libxml_unregister_node(xmlNodePtr nodep)
{
php_libxml_node_object *wrapper;
Expand All @@ -170,7 +161,8 @@ static void php_libxml_unregister_node(xmlNodePtr nodep)
if (nodeptr != NULL) {
wrapper = nodeptr->_private;
if (wrapper) {
php_libxml_clear_object(wrapper);
php_libxml_decrement_node_ptr(wrapper);
php_libxml_decrement_doc_ref(wrapper);
} else {
if (nodeptr->node != NULL && nodeptr->node->type != XML_DOCUMENT_NODE) {
nodeptr->node->_private = NULL;
Expand Down
1 change: 0 additions & 1 deletion ext/libxml/php_libxml.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ typedef struct _php_libxml_node_ptr {
typedef struct _php_libxml_node_object {
php_libxml_node_ptr *node;
php_libxml_ref_obj *document;
HashTable *properties;
zend_object std;
} php_libxml_node_object;

Expand Down