Skip to content

Commit 46357cb

Browse files
committed
dom: Merge declaration and assignment
1 parent 28c6659 commit 46357cb

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

ext/dom/xpath_callbacks.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -430,14 +430,12 @@ static zend_result php_dom_xpath_callback_dispatch(php_dom_xpath_callbacks *xpat
430430
if (Z_TYPE(callback_retval) != IS_UNDEF) {
431431
if (Z_TYPE(callback_retval) == IS_OBJECT
432432
&& (instanceof_function(Z_OBJCE(callback_retval), dom_get_node_ce(php_dom_follow_spec_node((const xmlNode *) ctxt->context->doc))))) {
433-
xmlNode *nodep;
434-
dom_object *obj;
435433
if (xpath_callbacks->node_list == NULL) {
436434
xpath_callbacks->node_list = zend_new_array(0);
437435
}
438436
zend_hash_next_index_insert_new(xpath_callbacks->node_list, &callback_retval);
439-
obj = Z_DOMOBJ_P(&callback_retval);
440-
nodep = dom_object_get_node(obj);
437+
dom_object *obj = Z_DOMOBJ_P(&callback_retval);
438+
xmlNodePtr nodep = dom_object_get_node(obj);
441439
valuePush(ctxt, xmlXPathNewNodeSet(nodep));
442440
} else if (Z_TYPE(callback_retval) == IS_FALSE || Z_TYPE(callback_retval) == IS_TRUE) {
443441
valuePush(ctxt, xmlXPathNewBoolean(Z_TYPE(callback_retval) == IS_TRUE));

0 commit comments

Comments
 (0)