fix #41: PHP-8.1 compat
[m6w6/ext-pq] / src / php_pqres.c
index 7e51271a5d8800badf9e7e1c88aae43b8d2eb73c..d9b10518b32118ba86b5b3dcd93f33bf47f5f62b 100644 (file)
@@ -1146,7 +1146,7 @@ static PHP_METHOD(pqres, fetchAll) {
        }
 }
 
-ZEND_BEGIN_ARG_INFO_EX(ai_pqres_count, 0, 0, 0)
+ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(ai_pqres_count, 0, 0, IS_LONG, 0)
 ZEND_END_ARG_INFO();
 static PHP_METHOD(pqres, count) {
        zend_error_handling zeh;
@@ -1194,7 +1194,7 @@ static PHP_METHOD(pqres, desc) {
 }
 
 #if PHP_VERSION_ID >= 80000
-ZEND_BEGIN_ARG_INFO_EX(ai_pqres_getIterator, 0, 0, 0)
+ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_OBJ_INFO_EX(ai_pqres_getIterator, 0, 0, Traversable, 0)
 ZEND_END_ARG_INFO();
 static PHP_METHOD(pqres, getIterator)
 {
@@ -1249,9 +1249,9 @@ PHP_MINIT_FUNCTION(pqres)
        php_pqres_class_entry->create_object = php_pqres_create_object;
        php_pqres_class_entry->get_iterator = php_pqres_iterator_init;
 #if PHP_VERSION_ID >= 80000
-       zend_class_implements(php_pqres_class_entry, 2, zend_ce_aggregate, spl_ce_Countable);
+       zend_class_implements(php_pqres_class_entry, 2, zend_ce_aggregate, zend_ce_countable);
 #else
-       zend_class_implements(php_pqres_class_entry, 2, zend_ce_traversable, spl_ce_Countable);
+       zend_class_implements(php_pqres_class_entry, 2, zend_ce_traversable, zend_ce_countable);
 #endif
 
        memcpy(&php_pqres_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));