Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/BSON/Iterator.c
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ static void php_phongo_iterator_it_dtor(zend_object_iterator* iter)
zval_ptr_dtor(&iter->data);
}

static int php_phongo_iterator_it_valid(zend_object_iterator* iter)
static PHONGO_ITERATOR_VALID_RESULT php_phongo_iterator_it_valid(zend_object_iterator* iter)
{
php_phongo_iterator_t* intern = Z_ITERATOR_OBJ_P(&iter->data);

Expand Down
7 changes: 7 additions & 0 deletions src/phongo_compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -218,4 +218,11 @@ const char* zend_get_object_type_case(const zend_class_entry* ce, zend_bool uppe
#define zend_get_object_type_uc(ce) zend_get_object_type_case((ce), true)
#endif /* PHP_VERSION_ID < 80200 */

/* zend_object_iterator_funcs.valid return type changed to zend_result in PHP 8.4 */
#if PHP_VERSION_ID < 80400
#define PHONGO_ITERATOR_VALID_RESULT int
#else
#define PHONGO_ITERATOR_VALID_RESULT zend_result
#endif

#endif /* PHONGO_COMPAT_H */