@@ -50,7 +50,7 @@ typedef struct _spl_ptr_heap {
50
50
spl_ptr_heap_ctor_func ctor ;
51
51
spl_ptr_heap_dtor_func dtor ;
52
52
spl_ptr_heap_cmp_func cmp ;
53
- int count ;
53
+ size_t count ;
54
54
int flags ;
55
55
size_t max_size ;
56
56
size_t elem_size ;
@@ -267,7 +267,7 @@ static spl_ptr_heap *spl_ptr_heap_init(spl_ptr_heap_cmp_func cmp, spl_ptr_heap_c
267
267
/* }}} */
268
268
269
269
static void spl_ptr_heap_insert (spl_ptr_heap * heap , void * elem , void * cmp_userdata ) { /* {{{ */
270
- int i ;
270
+ size_t i ;
271
271
272
272
if (heap -> count + 1 > heap -> max_size ) {
273
273
size_t alloc_size = heap -> max_size * heap -> elem_size ;
@@ -306,8 +306,8 @@ static void *spl_ptr_heap_top(spl_ptr_heap *heap) { /* {{{ */
306
306
/* }}} */
307
307
308
308
static zend_result spl_ptr_heap_delete_top (spl_ptr_heap * heap , void * elem , void * cmp_userdata ) { /* {{{ */
309
- int i , j ;
310
- const int limit = (heap -> count - 1 )/2 ;
309
+ size_t i , j ;
310
+ const size_t limit = (heap -> count - 1 )/2 ;
311
311
void * bottom ;
312
312
313
313
if (heap -> count == 0 ) {
@@ -355,7 +355,7 @@ static zend_result spl_ptr_heap_delete_top(spl_ptr_heap *heap, void *elem, void
355
355
/* }}} */
356
356
357
357
static spl_ptr_heap * spl_ptr_heap_clone (spl_ptr_heap * from ) { /* {{{ */
358
- int i ;
358
+ size_t i ;
359
359
360
360
spl_ptr_heap * heap = emalloc (sizeof (spl_ptr_heap ));
361
361
@@ -384,7 +384,7 @@ static void spl_ptr_heap_destroy(spl_ptr_heap *heap) { /* {{{ */
384
384
return ;
385
385
}
386
386
387
- int i ;
387
+ size_t i ;
388
388
389
389
heap -> flags |= SPL_HEAP_WRITE_LOCKED ;
390
390
@@ -399,7 +399,7 @@ static void spl_ptr_heap_destroy(spl_ptr_heap *heap) { /* {{{ */
399
399
}
400
400
/* }}} */
401
401
402
- static int spl_ptr_heap_count (spl_ptr_heap * heap ) { /* {{{ */
402
+ static size_t spl_ptr_heap_count (spl_ptr_heap * heap ) { /* {{{ */
403
403
return heap -> count ;
404
404
}
405
405
/* }}} */
@@ -534,7 +534,7 @@ static HashTable* spl_heap_object_get_debug_info(const zend_class_entry *ce, zen
534
534
535
535
array_init (& heap_array );
536
536
537
- for (zend_ulong i = 0 ; i < intern -> heap -> count ; ++ i ) {
537
+ for (size_t i = 0 ; i < intern -> heap -> count ; ++ i ) {
538
538
if (ce == spl_ce_SplPriorityQueue ) {
539
539
spl_pqueue_elem * pq_elem = spl_heap_elem (intern -> heap , i );
540
540
zval elem ;
0 commit comments