Skip to content

Commit

Permalink
Fix Windows failure
Browse files Browse the repository at this point in the history
  • Loading branch information
nielsdos committed Apr 30, 2024
1 parent fed1d5e commit 513e2b0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 24 deletions.
6 changes: 3 additions & 3 deletions ext/dom/dom_properties.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ zend_result dom_entity_encoding_read(dom_object *obj, zval *retval);
zend_result dom_entity_version_read(dom_object *obj, zval *retval);

/* entity reference properties */
int dom_entity_reference_child_read(dom_object *obj, zval *retval);
int dom_entity_reference_text_content_read(dom_object *obj, zval *retval);
int dom_entity_reference_child_nodes_read(dom_object *obj, zval *retval);
zend_result dom_entity_reference_child_read(dom_object *obj, zval *retval);
zend_result dom_entity_reference_text_content_read(dom_object *obj, zval *retval);
zend_result dom_entity_reference_child_nodes_read(dom_object *obj, zval *retval);

/* namednodemap properties */
zend_result dom_namednodemap_length_read(dom_object *obj, zval *retval);
Expand Down
27 changes: 6 additions & 21 deletions ext/dom/entityreference.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,9 @@ xmlEntityPtr dom_entity_reference_fetch_and_sync_declaration(xmlNodePtr referenc
return entity;
}

int dom_entity_reference_child_read(dom_object *obj, zval *retval)
zend_result dom_entity_reference_child_read(dom_object *obj, zval *retval)
{
xmlNodePtr nodep = dom_object_get_node(obj);

if (nodep == NULL) {
php_dom_throw_error(INVALID_STATE_ERR, true);
return FAILURE;
}
DOM_PROP_NODE(xmlNodePtr, nodep, obj);

xmlEntityPtr entity = dom_entity_reference_fetch_and_sync_declaration(nodep);
if (entity == NULL) {
Expand All @@ -99,27 +94,17 @@ int dom_entity_reference_child_read(dom_object *obj, zval *retval)
return SUCCESS;
}

int dom_entity_reference_text_content_read(dom_object *obj, zval *retval)
zend_result dom_entity_reference_text_content_read(dom_object *obj, zval *retval)
{
xmlNodePtr nodep = dom_object_get_node(obj);

if (nodep == NULL) {
php_dom_throw_error(INVALID_STATE_ERR, true);
return FAILURE;
}
DOM_PROP_NODE(xmlNodePtr, nodep, obj);

dom_entity_reference_fetch_and_sync_declaration(nodep);
return dom_node_text_content_read(obj, retval);
}

int dom_entity_reference_child_nodes_read(dom_object *obj, zval *retval)
zend_result dom_entity_reference_child_nodes_read(dom_object *obj, zval *retval)
{
xmlNodePtr nodep = dom_object_get_node(obj);

if (nodep == NULL) {
php_dom_throw_error(INVALID_STATE_ERR, true);
return FAILURE;
}
DOM_PROP_NODE(xmlNodePtr, nodep, obj);

dom_entity_reference_fetch_and_sync_declaration(nodep);
return dom_node_child_nodes_read(obj, retval);
Expand Down

0 comments on commit 513e2b0

Please sign in to comment.