Fix iterator prototypes for PHP 8.1 (#35)

* Fix iterator prototypes for PHP 8.1

* Simplify previous

* use ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX from phpc
This commit is contained in:
Remi Collet 2021-09-19 21:01:29 +02:00 committed by GitHub
parent 017a7e8c06
commit 71a71709b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -90,14 +90,28 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_gnupg_void_iterator_method, 0, 0, 0)
ZEND_END_ARG_INFO() ZEND_END_ARG_INFO()
/* }}} */ /* }}} */
ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_gnupg_current, 0, 0, IS_MIXED, 0)
ZEND_END_ARG_INFO()
#define arginfo_gnupg_key arginfo_gnupg_current
ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_gnupg_valid, 0, 0, _IS_BOOL, 0)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_gnupg_next, 0, 0, IS_VOID, 0)
ZEND_END_ARG_INFO()
#define arginfo_gnupg_rewind arginfo_gnupg_next
/* {{{ method list gnupg_keylistiterator */ /* {{{ method list gnupg_keylistiterator */
static zend_function_entry gnupg_keylistiterator_methods[] = { static zend_function_entry gnupg_keylistiterator_methods[] = {
PHP_ME(gnupg_keylistiterator, __construct, arginfo_gnupg_void_iterator_method, ZEND_ACC_PUBLIC) PHP_ME(gnupg_keylistiterator, __construct, arginfo_gnupg_void_iterator_method, ZEND_ACC_PUBLIC)
PHP_ME(gnupg_keylistiterator, current, arginfo_gnupg_void_iterator_method, ZEND_ACC_PUBLIC) PHP_ME(gnupg_keylistiterator, current, arginfo_gnupg_current, ZEND_ACC_PUBLIC)
PHP_ME(gnupg_keylistiterator, key, arginfo_gnupg_void_iterator_method, ZEND_ACC_PUBLIC) PHP_ME(gnupg_keylistiterator, key, arginfo_gnupg_key, ZEND_ACC_PUBLIC)
PHP_ME(gnupg_keylistiterator, next, arginfo_gnupg_void_iterator_method, ZEND_ACC_PUBLIC) PHP_ME(gnupg_keylistiterator, next, arginfo_gnupg_next, ZEND_ACC_PUBLIC)
PHP_ME(gnupg_keylistiterator, rewind, arginfo_gnupg_void_iterator_method, ZEND_ACC_PUBLIC) PHP_ME(gnupg_keylistiterator, rewind, arginfo_gnupg_rewind, ZEND_ACC_PUBLIC)
PHP_ME(gnupg_keylistiterator, valid, arginfo_gnupg_void_iterator_method, ZEND_ACC_PUBLIC) PHP_ME(gnupg_keylistiterator, valid, arginfo_gnupg_valid, ZEND_ACC_PUBLIC)
PHPC_FE_END PHPC_FE_END
}; };
/* }}} */ /* }}} */