@@ -92,7 +92,7 @@ zend_long php_dom_get_nodelist_length(dom_object *obj)
92
92
reset_objmap_cache (objmap );
93
93
}
94
94
95
- int count = 0 ;
95
+ zend_long count = 0 ;
96
96
if (objmap -> nodetype == XML_ATTRIBUTE_NODE || objmap -> nodetype == XML_ELEMENT_NODE ) {
97
97
xmlNodePtr curnode = dom_nodelist_iter_start_first_child (nodep );
98
98
if (curnode ) {
@@ -106,7 +106,7 @@ zend_long php_dom_get_nodelist_length(dom_object *obj)
106
106
xmlNodePtr basep = nodep ;
107
107
nodep = php_dom_first_child_of_container_node (basep );
108
108
dom_get_elements_by_tag_name_ns_raw (
109
- basep , nodep , objmap -> ns , objmap -> local , objmap -> local_lower , & count , INT_MAX - 1 /* because of <= */ );
109
+ basep , nodep , objmap -> ns , objmap -> local , objmap -> local_lower , & count , ZEND_LONG_MAX - 1 /* because of <= */ );
110
110
}
111
111
112
112
objmap -> cached_length = count ;
@@ -159,7 +159,7 @@ void php_dom_nodelist_get_item_into_zval(dom_nnodemap_object *objmap, zend_long
159
159
* TODO: in the future we could extend the logic of the node list such that backwards searches
160
160
* are also possible. */
161
161
bool restart = true;
162
- int relative_index = index ;
162
+ zend_long relative_index = index ;
163
163
if (index >= objmap -> cached_obj_index && objmap -> cached_obj && !php_dom_is_cache_tag_stale_from_node (& objmap -> cache_tag , nodep )) {
164
164
xmlNodePtr cached_obj_xml_node = dom_object_get_node (objmap -> cached_obj );
165
165
@@ -177,7 +177,7 @@ void php_dom_nodelist_get_item_into_zval(dom_nnodemap_object *objmap, zend_long
177
177
nodep = cached_obj_xml_node ;
178
178
}
179
179
}
180
- int count = 0 ;
180
+ zend_long count = 0 ;
181
181
if (objmap -> nodetype == XML_ATTRIBUTE_NODE || objmap -> nodetype == XML_ELEMENT_NODE ) {
182
182
if (restart ) {
183
183
nodep = dom_nodelist_iter_start_first_child (nodep );
0 commit comments