From e709af4c60f5f70dd277ec34ee5c3af2555e6654 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 6 Oct 2021 06:01:29 +0200 Subject: [PATCH] fix Iterator prototypes for PHP 8.1 --- excimer.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/excimer.c b/excimer.c index 347bdd8..2024a07 100644 --- a/excimer.c +++ b/excimer.c @@ -238,6 +238,11 @@ static zend_object_handlers ExcimerLogEntry_handlers; static zend_object_handlers ExcimerTimer_handlers; /** {{{ arginfo */ +#ifndef ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX +#define ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(name, return_reference, required_num_args, type, allow_null) \ + ZEND_BEGIN_ARG_INFO_EX(name, 0, return_reference, required_num_args) +#endif + ZEND_BEGIN_ARG_INFO(arginfo_ExcimerProfiler_setPeriod, 0) ZEND_ARG_INFO(0, period) ZEND_END_ARG_INFO() @@ -282,38 +287,38 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO(arginfo_ExcimerLog_getEventCount, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO(arginfo_ExcimerLog_current, 0) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_ExcimerLog_current, 0, 0, IS_MIXED, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO(arginfo_ExcimerLog_key, 0) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_ExcimerLog_key, 0, 0, IS_MIXED, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO(arginfo_ExcimerLog_next, 0) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_ExcimerLog_next, 0, 0, IS_VOID, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO(arginfo_ExcimerLog_rewind, 0) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_ExcimerLog_rewind, 0, 0, IS_VOID, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO(arginfo_ExcimerLog_valid, 0) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_ExcimerLog_valid, 0, 0, _IS_BOOL, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO(arginfo_ExcimerLog_count, 0) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_ExcimerLog_count, 0, 0, IS_LONG, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO(arginfo_ExcimerLog_offsetExists, 0) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_ExcimerLog_offsetExists, 0, 1, _IS_BOOL, 0) ZEND_ARG_INFO(0, offset) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO(arginfo_ExcimerLog_offsetGet, 0) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_ExcimerLog_offsetGet, 0, 1, IS_MIXED, 0) ZEND_ARG_INFO(0, offset) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO(arginfo_ExcimerLog_offsetSet, 0) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_ExcimerLog_offsetSet, 0, 2, IS_VOID, 0) ZEND_ARG_INFO(0, offset) ZEND_ARG_INFO(0, value) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO(arginfo_ExcimerLog_offsetUnset, 0) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_ExcimerLog_offsetUnset, 0, 1, IS_VOID, 0) ZEND_ARG_INFO(0, offset) ZEND_END_ARG_INFO()