From e1f768c5b2ba8eb6d5b041664c02e2b53b7017bb Mon Sep 17 00:00:00 2001 From: David Carlier Date: Mon, 10 Nov 2025 13:04:22 +0000 Subject: [PATCH 1/8] ext/intl: move from C to C++ code step 6. Please enter the commit message for your changes. Lines starting --- .../breakiterator/breakiterator_class.cpp | 8 +- .../breakiterator/breakiterator_iterators.cpp | 10 +- .../breakiterator/breakiterator_iterators.h | 6 +- .../breakiterator/breakiterator_methods.cpp | 46 ++++---- .../codepointiterator_methods.cpp | 4 +- .../rulebasedbreakiterator_methods.cpp | 14 +-- ext/intl/calendar/calendar_class.cpp | 8 +- ext/intl/calendar/calendar_methods.cpp | 103 +++++++++--------- .../calendar/gregoriancalendar_methods.cpp | 16 ++- ext/intl/collator/collator_attr.cpp | 10 +- ext/intl/collator/collator_class.cpp | 10 +- ext/intl/collator/collator_class.h | 12 -- ext/intl/collator/collator_compare.cpp | 4 +- ext/intl/collator/collator_convert.cpp | 22 ++-- ext/intl/collator/collator_convert.h | 6 - ext/intl/collator/collator_create.cpp | 6 +- ext/intl/collator/collator_error.cpp | 6 +- ext/intl/collator/collator_locale.cpp | 4 +- ext/intl/collator/collator_sort.cpp | 10 +- ext/intl/common/common_date.cpp | 8 +- ext/intl/common/common_date.h | 8 +- ext/intl/common/common_enum.cpp | 14 +-- ext/intl/common/common_enum.h | 22 ++-- ext/intl/common/common_error.cpp | 10 +- ext/intl/config.m4 | 9 +- ext/intl/config.w32 | 2 +- ext/intl/converter/converter.cpp | 4 +- ext/intl/converter/converter.h | 6 - ext/intl/dateformat/dateformat.cpp | 6 +- ext/intl/dateformat/dateformat_attr.cpp | 16 ++- ext/intl/dateformat/dateformat_attrcpp.cpp | 18 ++- ext/intl/dateformat/dateformat_class.cpp | 2 - ext/intl/dateformat/dateformat_class.h | 12 -- ext/intl/dateformat/dateformat_create.cpp | 6 +- ext/intl/dateformat/dateformat_data.h | 12 -- ext/intl/dateformat/dateformat_format.cpp | 5 +- .../dateformat/dateformat_format_object.cpp | 6 +- ext/intl/dateformat/dateformat_helpers.cpp | 2 - ext/intl/dateformat/dateformat_helpers.h | 2 - ext/intl/dateformat/dateformat_parse.cpp | 8 +- .../dateformat/datepatterngenerator_class.cpp | 2 - .../datepatterngenerator_methods.cpp | 10 +- ext/intl/formatter/formatter_attr.cpp | 20 ++-- ext/intl/formatter/formatter_class.cpp | 13 +-- ext/intl/formatter/formatter_class.h | 12 -- ext/intl/formatter/formatter_data.h | 12 -- ext/intl/formatter/formatter_format.cpp | 6 +- ext/intl/formatter/formatter_main.cpp | 10 +- ext/intl/formatter/formatter_parse.cpp | 7 +- ext/intl/grapheme/grapheme.h | 6 - ext/intl/grapheme/grapheme_string.cpp | 24 ++-- ext/intl/grapheme/grapheme_util.cpp | 20 ++-- ext/intl/grapheme/grapheme_util.h | 6 - ext/intl/idn/idn.cpp | 8 +- ext/intl/{intl_convert.c => intl_convert.cpp} | 66 +++++++++++ ext/intl/intl_convert.h | 8 ++ ext/intl/intl_convertcpp.cpp | 86 --------------- ext/intl/intl_convertcpp.h | 31 ------ ext/intl/{intl_error.c => intl_error.cpp} | 2 +- .../listformatter/listformatter_class.cpp | 2 - ext/intl/listformatter/listformatter_class.h | 6 - ext/intl/locale/locale_class.cpp | 4 +- ext/intl/locale/locale_class.h | 2 +- ext/intl/locale/locale_methods.cpp | 44 ++++---- ext/intl/msgformat/msgformat.cpp | 10 +- ext/intl/msgformat/msgformat_attr.cpp | 8 +- ext/intl/msgformat/msgformat_class.cpp | 8 +- ext/intl/msgformat/msgformat_data.cpp | 4 +- ext/intl/msgformat/msgformat_data.h | 12 -- ext/intl/msgformat/msgformat_format.cpp | 6 +- ext/intl/msgformat/msgformat_helpers.cpp | 11 +- ext/intl/msgformat/msgformat_parse.cpp | 6 +- ext/intl/normalizer/normalizer_class.cpp | 8 +- ext/intl/normalizer/normalizer_class.h | 6 - ext/intl/normalizer/normalizer_normalize.cpp | 8 +- ext/intl/{php_intl.c => php_intl.cpp} | 1 - ext/intl/php_intl.h | 5 - ext/intl/php_intl_arginfo.h | 4 +- .../rangeformatter/rangeformatter_class.cpp | 35 +++--- ext/intl/resourcebundle/resourcebundle.cpp | 4 +- ext/intl/resourcebundle/resourcebundle.h | 6 - .../resourcebundle/resourcebundle_class.cpp | 20 ++-- .../resourcebundle/resourcebundle_class.h | 12 -- .../resourcebundle_iterator.cpp | 4 +- .../resourcebundle/resourcebundle_iterator.h | 6 - ext/intl/spoofchecker/spoofchecker_class.cpp | 12 +- ext/intl/spoofchecker/spoofchecker_class.h | 12 -- ext/intl/spoofchecker/spoofchecker_create.cpp | 4 +- ext/intl/spoofchecker/spoofchecker_main.cpp | 14 +-- ext/intl/timezone/timezone_class.cpp | 27 ++--- ext/intl/timezone/timezone_methods.cpp | 57 +++++----- .../transliterator/transliterator_class.cpp | 6 +- .../transliterator/transliterator_class.h | 12 -- .../transliterator/transliterator_methods.cpp | 18 ++- ext/intl/uchar/uchar.cpp | 2 - 95 files changed, 435 insertions(+), 803 deletions(-) rename ext/intl/{intl_convert.c => intl_convert.cpp} (78%) delete mode 100644 ext/intl/intl_convertcpp.cpp delete mode 100644 ext/intl/intl_convertcpp.h rename ext/intl/{intl_error.c => intl_error.cpp} (98%) rename ext/intl/{php_intl.c => php_intl.cpp} (99%) diff --git a/ext/intl/breakiterator/breakiterator_class.cpp b/ext/intl/breakiterator/breakiterator_class.cpp index 4976d4ff675bc..f58330c8abaaa 100644 --- a/ext/intl/breakiterator/breakiterator_class.cpp +++ b/ext/intl/breakiterator/breakiterator_class.cpp @@ -24,14 +24,12 @@ #include -extern "C" { #define USE_BREAKITERATOR_POINTER 1 #include "breakiterator_class.h" #include "breakiterator_arginfo.h" #include #include #include -} using PHP::CodePointBreakIterator; using icu::RuleBasedBreakIterator; @@ -43,7 +41,7 @@ zend_class_entry *CodePointBreakIterator_ce_ptr; zend_object_handlers BreakIterator_handlers; /* }}} */ -U_CFUNC void breakiterator_object_create(zval *object, +void breakiterator_object_create(zval *object, BreakIterator *biter, int brand_new) { UClassID classId = biter->getDynamicClassID(); @@ -63,7 +61,7 @@ U_CFUNC void breakiterator_object_create(zval *object, breakiterator_object_construct(object, biter); } -U_CFUNC void breakiterator_object_construct(zval *object, +void breakiterator_object_construct(zval *object, BreakIterator *biter) { BreakIterator_object *bio; @@ -201,7 +199,7 @@ static zend_object *BreakIterator_object_create(zend_class_entry *ce) /* {{{ breakiterator_register_BreakIterator_class * Initialize 'BreakIterator' class */ -U_CFUNC void breakiterator_register_BreakIterator_class(void) +void breakiterator_register_BreakIterator_class(void) { /* Create and register 'BreakIterator' class. */ diff --git a/ext/intl/breakiterator/breakiterator_iterators.cpp b/ext/intl/breakiterator/breakiterator_iterators.cpp index 34176bf90e528..be458f45c3d13 100644 --- a/ext/intl/breakiterator/breakiterator_iterators.cpp +++ b/ext/intl/breakiterator/breakiterator_iterators.cpp @@ -21,7 +21,6 @@ #include "breakiterator_iterators.h" #include "../common/common_enum.h" -extern "C" { #define USE_BREAKITERATOR_POINTER #include "breakiterator_class.h" #include "breakiterator_iterators_arginfo.h" @@ -29,7 +28,6 @@ extern "C" { #include "../locale/locale.h" #include #include -} static zend_class_entry *IntlPartsIterator_ce_ptr; @@ -101,7 +99,7 @@ static const zend_object_iterator_funcs breakiterator_iterator_funcs = { NULL, /* get_gc */ }; -U_CFUNC zend_object_iterator *_breakiterator_get_iterator( +zend_object_iterator *_breakiterator_get_iterator( zend_class_entry *ce, zval *object, int by_ref) { BreakIterator_object *bio; @@ -253,7 +251,7 @@ void IntlIterator_from_BreakIterator_parts(zval *break_iter_zv, ((zoi_break_iter_parts*)ii->iterator)->index_right = 0; } -U_CFUNC PHP_METHOD(IntlPartsIterator, getBreakIterator) +PHP_METHOD(IntlPartsIterator, getBreakIterator) { INTLITERATOR_METHOD_INIT_VARS; @@ -264,7 +262,7 @@ U_CFUNC PHP_METHOD(IntlPartsIterator, getBreakIterator) RETURN_COPY_DEREF(&ii->iterator->data); } -U_CFUNC PHP_METHOD(IntlPartsIterator, getRuleStatus) +PHP_METHOD(IntlPartsIterator, getRuleStatus) { INTLITERATOR_METHOD_INIT_VARS; @@ -278,7 +276,7 @@ U_CFUNC PHP_METHOD(IntlPartsIterator, getRuleStatus) Z_OBJ_P(iter), Z_OBJCE_P(iter), NULL, "getrulestatus", return_value); } -U_CFUNC void breakiterator_register_IntlPartsIterator_class(void) +void breakiterator_register_IntlPartsIterator_class(void) { /* Create and register 'BreakIterator' class. */ IntlPartsIterator_ce_ptr = register_class_IntlPartsIterator(IntlIterator_ce_ptr); diff --git a/ext/intl/breakiterator/breakiterator_iterators.h b/ext/intl/breakiterator/breakiterator_iterators.h index e52d066ac9edb..182ffe18227f4 100644 --- a/ext/intl/breakiterator/breakiterator_iterators.h +++ b/ext/intl/breakiterator/breakiterator_iterators.h @@ -16,10 +16,8 @@ #include -U_CDECL_BEGIN #include #include -U_CDECL_END typedef enum { PARTS_ITERATOR_KEY_SEQUENTIAL, @@ -33,8 +31,8 @@ void IntlIterator_from_BreakIterator_parts(zval *break_iter_zv, parts_iter_key_type key_type); #endif -U_CFUNC zend_object_iterator *_breakiterator_get_iterator( +zend_object_iterator *_breakiterator_get_iterator( zend_class_entry *ce, zval *object, int by_ref); -U_CFUNC void breakiterator_register_IntlPartsIterator_class(void); +void breakiterator_register_IntlPartsIterator_class(void); #endif diff --git a/ext/intl/breakiterator/breakiterator_methods.cpp b/ext/intl/breakiterator/breakiterator_methods.cpp index c9791d4b23ae6..ac5819ce834b0 100644 --- a/ext/intl/breakiterator/breakiterator_methods.cpp +++ b/ext/intl/breakiterator/breakiterator_methods.cpp @@ -21,20 +21,18 @@ #include "breakiterator_iterators.h" -extern "C" { #include "../php_intl.h" #define USE_BREAKITERATOR_POINTER 1 #include "breakiterator_class.h" #include "../locale/locale.h" #include #include -} using PHP::CodePointBreakIterator; using icu::BreakIterator; using icu::Locale; -U_CFUNC PHP_METHOD(IntlBreakIterator, __construct) +PHP_METHOD(IntlBreakIterator, __construct) { zend_throw_exception( NULL, "An object of this type cannot be created with the new operator", @@ -70,42 +68,42 @@ static void _breakiter_factory( breakiterator_object_create(return_value, biter, 1); } -U_CFUNC PHP_METHOD(IntlBreakIterator, createWordInstance) +PHP_METHOD(IntlBreakIterator, createWordInstance) { _breakiter_factory( &BreakIterator::createWordInstance, INTERNAL_FUNCTION_PARAM_PASSTHRU); } -U_CFUNC PHP_METHOD(IntlBreakIterator, createLineInstance) +PHP_METHOD(IntlBreakIterator, createLineInstance) { _breakiter_factory( &BreakIterator::createLineInstance, INTERNAL_FUNCTION_PARAM_PASSTHRU); } -U_CFUNC PHP_METHOD(IntlBreakIterator, createCharacterInstance) +PHP_METHOD(IntlBreakIterator, createCharacterInstance) { _breakiter_factory( &BreakIterator::createCharacterInstance, INTERNAL_FUNCTION_PARAM_PASSTHRU); } -U_CFUNC PHP_METHOD(IntlBreakIterator, createSentenceInstance) +PHP_METHOD(IntlBreakIterator, createSentenceInstance) { _breakiter_factory( &BreakIterator::createSentenceInstance, INTERNAL_FUNCTION_PARAM_PASSTHRU); } -U_CFUNC PHP_METHOD(IntlBreakIterator, createTitleInstance) +PHP_METHOD(IntlBreakIterator, createTitleInstance) { _breakiter_factory( &BreakIterator::createTitleInstance, INTERNAL_FUNCTION_PARAM_PASSTHRU); } -U_CFUNC PHP_METHOD(IntlBreakIterator, createCodePointInstance) +PHP_METHOD(IntlBreakIterator, createCodePointInstance) { intl_error_reset(NULL); @@ -115,7 +113,7 @@ U_CFUNC PHP_METHOD(IntlBreakIterator, createCodePointInstance) breakiterator_object_create(return_value, cpbi, 1); } -U_CFUNC PHP_METHOD(IntlBreakIterator, getText) +PHP_METHOD(IntlBreakIterator, getText) { BREAKITER_METHOD_INIT_VARS; object = ZEND_THIS; @@ -131,7 +129,7 @@ U_CFUNC PHP_METHOD(IntlBreakIterator, getText) } } -U_CFUNC PHP_METHOD(IntlBreakIterator, setText) +PHP_METHOD(IntlBreakIterator, setText) { UText *ut = NULL; zend_string *text; @@ -200,25 +198,25 @@ static void _breakiter_int32_ret_int32( RETURN_LONG((zend_long)res); } -U_CFUNC PHP_METHOD(IntlBreakIterator, first) +PHP_METHOD(IntlBreakIterator, first) { _breakiter_no_args_ret_int32(&BreakIterator::first, INTERNAL_FUNCTION_PARAM_PASSTHRU); } -U_CFUNC PHP_METHOD(IntlBreakIterator, last) +PHP_METHOD(IntlBreakIterator, last) { _breakiter_no_args_ret_int32(&BreakIterator::last, INTERNAL_FUNCTION_PARAM_PASSTHRU); } -U_CFUNC PHP_METHOD(IntlBreakIterator, previous) +PHP_METHOD(IntlBreakIterator, previous) { _breakiter_no_args_ret_int32(&BreakIterator::previous, INTERNAL_FUNCTION_PARAM_PASSTHRU); } -U_CFUNC PHP_METHOD(IntlBreakIterator, next) +PHP_METHOD(IntlBreakIterator, next) { zval *arg = NULL; @@ -237,7 +235,7 @@ U_CFUNC PHP_METHOD(IntlBreakIterator, next) } } -U_CFUNC PHP_METHOD(IntlBreakIterator, current) +PHP_METHOD(IntlBreakIterator, current) { BREAKITER_METHOD_INIT_VARS; object = ZEND_THIS; @@ -251,21 +249,21 @@ U_CFUNC PHP_METHOD(IntlBreakIterator, current) RETURN_LONG((zend_long)res); } -U_CFUNC PHP_METHOD(IntlBreakIterator, following) +PHP_METHOD(IntlBreakIterator, following) { _breakiter_int32_ret_int32( &BreakIterator::following, INTERNAL_FUNCTION_PARAM_PASSTHRU); } -U_CFUNC PHP_METHOD(IntlBreakIterator, preceding) +PHP_METHOD(IntlBreakIterator, preceding) { _breakiter_int32_ret_int32( &BreakIterator::preceding, INTERNAL_FUNCTION_PARAM_PASSTHRU); } -U_CFUNC PHP_METHOD(IntlBreakIterator, isBoundary) +PHP_METHOD(IntlBreakIterator, isBoundary) { zend_long offset; BREAKITER_METHOD_INIT_VARS; @@ -287,7 +285,7 @@ U_CFUNC PHP_METHOD(IntlBreakIterator, isBoundary) RETURN_BOOL((zend_long)res); } -U_CFUNC PHP_METHOD(IntlBreakIterator, getLocale) +PHP_METHOD(IntlBreakIterator, getLocale) { zend_long locale_type; BREAKITER_METHOD_INIT_VARS; @@ -313,7 +311,7 @@ U_CFUNC PHP_METHOD(IntlBreakIterator, getLocale) RETURN_STRING(locale.getName()); } -U_CFUNC PHP_METHOD(IntlBreakIterator, getPartsIterator) +PHP_METHOD(IntlBreakIterator, getPartsIterator) { zend_long key_type = 0; BREAKITER_METHOD_INIT_VARS; @@ -338,7 +336,7 @@ U_CFUNC PHP_METHOD(IntlBreakIterator, getPartsIterator) object, return_value, (parts_iter_key_type)key_type); } -U_CFUNC PHP_METHOD(IntlBreakIterator, getErrorCode) +PHP_METHOD(IntlBreakIterator, getErrorCode) { BREAKITER_METHOD_INIT_VARS; object = ZEND_THIS; @@ -350,7 +348,7 @@ U_CFUNC PHP_METHOD(IntlBreakIterator, getErrorCode) RETURN_LONG((zend_long)BREAKITER_ERROR_CODE(bio)); } -U_CFUNC PHP_METHOD(IntlBreakIterator, getErrorMessage) +PHP_METHOD(IntlBreakIterator, getErrorMessage) { zend_string* message = NULL; BREAKITER_METHOD_INIT_VARS; @@ -366,7 +364,7 @@ U_CFUNC PHP_METHOD(IntlBreakIterator, getErrorMessage) RETURN_STR(message); } -U_CFUNC PHP_METHOD(IntlBreakIterator, getIterator) +PHP_METHOD(IntlBreakIterator, getIterator) { ZEND_PARSE_PARAMETERS_NONE(); diff --git a/ext/intl/breakiterator/codepointiterator_methods.cpp b/ext/intl/breakiterator/codepointiterator_methods.cpp index 49beb41be4e97..76dc04bf4214a 100644 --- a/ext/intl/breakiterator/codepointiterator_methods.cpp +++ b/ext/intl/breakiterator/codepointiterator_methods.cpp @@ -14,10 +14,8 @@ #include "codepointiterator_internal.h" -extern "C" { #define USE_BREAKITERATOR_POINTER 1 #include "breakiterator_class.h" -} using PHP::CodePointBreakIterator; @@ -25,7 +23,7 @@ static inline CodePointBreakIterator *fetch_cpbi(BreakIterator_object *bio) { return (CodePointBreakIterator*)bio->biter; } -U_CFUNC PHP_METHOD(IntlCodePointBreakIterator, getLastCodePoint) +PHP_METHOD(IntlCodePointBreakIterator, getLastCodePoint) { BREAKITER_METHOD_INIT_VARS; object = ZEND_THIS; diff --git a/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp b/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp index a7c322b1d8169..f03a626dfe628 100644 --- a/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp +++ b/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp @@ -15,14 +15,12 @@ #include #include -extern "C" { #define USE_BREAKITERATOR_POINTER 1 #include "breakiterator_class.h" #include #include -} -#include "../intl_convertcpp.h" +#include "../intl_convert.h" #include "../intl_common.h" using icu::RuleBasedBreakIterator; @@ -32,7 +30,7 @@ static inline RuleBasedBreakIterator *fetch_rbbi(BreakIterator_object *bio) { return (RuleBasedBreakIterator*)bio->biter; } -U_CFUNC PHP_METHOD(IntlRuleBasedBreakIterator, __construct) +PHP_METHOD(IntlRuleBasedBreakIterator, __construct) { zend_string *rules; bool compiled = false; @@ -89,7 +87,7 @@ U_CFUNC PHP_METHOD(IntlRuleBasedBreakIterator, __construct) breakiterator_object_create(object, rbbi, false); } -U_CFUNC PHP_METHOD(IntlRuleBasedBreakIterator, getRules) +PHP_METHOD(IntlRuleBasedBreakIterator, getRules) { BREAKITER_METHOD_INIT_VARS; object = ZEND_THIS; @@ -111,7 +109,7 @@ U_CFUNC PHP_METHOD(IntlRuleBasedBreakIterator, getRules) RETVAL_STR(u8str); } -U_CFUNC PHP_METHOD(IntlRuleBasedBreakIterator, getRuleStatus) +PHP_METHOD(IntlRuleBasedBreakIterator, getRuleStatus) { BREAKITER_METHOD_INIT_VARS; object = ZEND_THIS; @@ -123,7 +121,7 @@ U_CFUNC PHP_METHOD(IntlRuleBasedBreakIterator, getRuleStatus) RETURN_LONG(fetch_rbbi(bio)->getRuleStatus()); } -U_CFUNC PHP_METHOD(IntlRuleBasedBreakIterator, getRuleStatusVec) +PHP_METHOD(IntlRuleBasedBreakIterator, getRuleStatusVec) { BREAKITER_METHOD_INIT_VARS; object = ZEND_THIS; @@ -153,7 +151,7 @@ U_CFUNC PHP_METHOD(IntlRuleBasedBreakIterator, getRuleStatusVec) } } -U_CFUNC PHP_METHOD(IntlRuleBasedBreakIterator, getBinaryRules) +PHP_METHOD(IntlRuleBasedBreakIterator, getBinaryRules) { BREAKITER_METHOD_INIT_VARS; object = ZEND_THIS; diff --git a/ext/intl/calendar/calendar_class.cpp b/ext/intl/calendar/calendar_class.cpp index 326b5475b73ab..e98cab2eed0d0 100644 --- a/ext/intl/calendar/calendar_class.cpp +++ b/ext/intl/calendar/calendar_class.cpp @@ -21,7 +21,6 @@ #include #include -extern "C" { #define USE_TIMEZONE_POINTER 1 #include "../timezone/timezone_class.h" #define USE_CALENDAR_POINTER 1 @@ -29,7 +28,6 @@ extern "C" { #include "calendar_arginfo.h" #include #include -} using icu::GregorianCalendar; using icu::Locale; @@ -40,7 +38,7 @@ zend_class_entry *GregorianCalendar_ce_ptr; zend_object_handlers Calendar_handlers; /* }}} */ -U_CFUNC void calendar_object_create(zval *object, +void calendar_object_create(zval *object, Calendar *calendar) { UClassID classId = calendar->getDynamicClassID(); @@ -57,14 +55,14 @@ U_CFUNC void calendar_object_create(zval *object, calendar_object_construct(object, calendar); } -U_CFUNC Calendar *calendar_fetch_native_calendar(zend_object *object) +Calendar *calendar_fetch_native_calendar(zend_object *object) { Calendar_object *co = php_intl_calendar_fetch_object(object); return co->ucal; } -U_CFUNC void calendar_object_construct(zval *object, +void calendar_object_construct(zval *object, Calendar *calendar) { Calendar_object *co; diff --git a/ext/intl/calendar/calendar_methods.cpp b/ext/intl/calendar/calendar_methods.cpp index c404286fe0944..4022f7805a8d7 100644 --- a/ext/intl/calendar/calendar_methods.cpp +++ b/ext/intl/calendar/calendar_methods.cpp @@ -24,20 +24,17 @@ #include #include -#include "../intl_convertcpp.h" +#include "../intl_convert.h" #include "../common/common_date.h" -extern "C" { #include "../php_intl.h" #define USE_TIMEZONE_POINTER 1 #include "../timezone/timezone_class.h" #define USE_CALENDAR_POINTER 1 #include "calendar_class.h" -#include "../intl_convert.h" #include #include #include -} #include "../common/common_enum.h" using icu::Locale; @@ -63,14 +60,14 @@ using icu::Locale; RETURN_THROWS(); \ } -U_CFUNC PHP_METHOD(IntlCalendar, __construct) +PHP_METHOD(IntlCalendar, __construct) { zend_throw_exception( NULL, "An object of this type cannot be created with the new operator", 0 ); } -U_CFUNC PHP_FUNCTION(intlcal_create_instance) +PHP_FUNCTION(intlcal_create_instance) { zend_object *timezone_object = nullptr; zend_string *timezone_string = nullptr; @@ -158,7 +155,7 @@ class BugStringCharEnumeration : public StringEnumeration }; UOBJECT_DEFINE_RTTI_IMPLEMENTATION(BugStringCharEnumeration) -U_CFUNC PHP_FUNCTION(intlcal_get_keyword_values_for_locale) +PHP_FUNCTION(intlcal_get_keyword_values_for_locale) { UErrorCode status = U_ZERO_ERROR; char *key, @@ -186,7 +183,7 @@ U_CFUNC PHP_FUNCTION(intlcal_get_keyword_values_for_locale) IntlIterator_from_StringEnumeration(se, return_value); } -U_CFUNC PHP_FUNCTION(intlcal_get_now) +PHP_FUNCTION(intlcal_get_now) { intl_error_reset(NULL); @@ -195,7 +192,7 @@ U_CFUNC PHP_FUNCTION(intlcal_get_now) RETURN_DOUBLE((double)Calendar::getNow()); } -U_CFUNC PHP_FUNCTION(intlcal_get_available_locales) +PHP_FUNCTION(intlcal_get_available_locales) { intl_error_reset(NULL); @@ -233,13 +230,13 @@ static void _php_intlcal_field_uec_ret_in32t_method( RETURN_LONG((zend_long)result); } -U_CFUNC PHP_FUNCTION(intlcal_get) +PHP_FUNCTION(intlcal_get) { _php_intlcal_field_uec_ret_in32t_method(&Calendar::get, INTERNAL_FUNCTION_PARAM_PASSTHRU); } -U_CFUNC PHP_FUNCTION(intlcal_get_time) +PHP_FUNCTION(intlcal_get_time) { CALENDAR_METHOD_INIT_VARS; @@ -256,7 +253,7 @@ U_CFUNC PHP_FUNCTION(intlcal_get_time) RETURN_DOUBLE((double)result); } -U_CFUNC PHP_FUNCTION(intlcal_set_time) +PHP_FUNCTION(intlcal_set_time) { double time_arg; CALENDAR_METHOD_INIT_VARS; @@ -274,7 +271,7 @@ U_CFUNC PHP_FUNCTION(intlcal_set_time) RETURN_TRUE; } -U_CFUNC PHP_FUNCTION(intlcal_add) +PHP_FUNCTION(intlcal_add) { zend_long field, amount; @@ -297,7 +294,7 @@ U_CFUNC PHP_FUNCTION(intlcal_add) } /* {{{ Set formatter's timezone. */ -U_CFUNC PHP_FUNCTION(intlcal_set_time_zone) +PHP_FUNCTION(intlcal_set_time_zone) { zend_object *timezone_object = nullptr; zend_string *timezone_string = nullptr; @@ -326,7 +323,7 @@ U_CFUNC PHP_FUNCTION(intlcal_set_time_zone) RETURN_TRUE; } -U_CFUNC PHP_METHOD(IntlCalendar, setTimeZone) +PHP_METHOD(IntlCalendar, setTimeZone) { zend_object *timezone_object = nullptr; zend_string *timezone_string = nullptr; @@ -383,17 +380,17 @@ static void _php_intlcal_before_after( RETURN_BOOL((int)res); } -U_CFUNC PHP_FUNCTION(intlcal_after) +PHP_FUNCTION(intlcal_after) { _php_intlcal_before_after(&Calendar::after, INTERNAL_FUNCTION_PARAM_PASSTHRU); } -U_CFUNC PHP_FUNCTION(intlcal_before) +PHP_FUNCTION(intlcal_before) { _php_intlcal_before_after(&Calendar::before, INTERNAL_FUNCTION_PARAM_PASSTHRU); } -U_CFUNC PHP_FUNCTION(intlcal_set) +PHP_FUNCTION(intlcal_set) { zend_long args[6]; @@ -442,7 +439,7 @@ U_CFUNC PHP_FUNCTION(intlcal_set) RETURN_TRUE; } -U_CFUNC PHP_METHOD(IntlCalendar, setDate) +PHP_METHOD(IntlCalendar, setDate) { zend_long year, month, day; @@ -464,7 +461,7 @@ U_CFUNC PHP_METHOD(IntlCalendar, setDate) co->ucal->set((int32_t) year, (int32_t) month, (int32_t) day); } -U_CFUNC PHP_METHOD(IntlCalendar, setDateTime) +PHP_METHOD(IntlCalendar, setDateTime) { zend_long year, month, day, hour, minute, second = 0; bool second_is_null = true; @@ -494,7 +491,7 @@ U_CFUNC PHP_METHOD(IntlCalendar, setDateTime) } } -U_CFUNC PHP_FUNCTION(intlcal_roll) +PHP_FUNCTION(intlcal_roll) { zval *zvalue; zend_long field, value; @@ -523,7 +520,7 @@ U_CFUNC PHP_FUNCTION(intlcal_roll) RETURN_TRUE; } -U_CFUNC PHP_FUNCTION(intlcal_clear) +PHP_FUNCTION(intlcal_clear) { zend_long field; bool field_is_null = 1; @@ -547,7 +544,7 @@ U_CFUNC PHP_FUNCTION(intlcal_clear) RETURN_TRUE; } -U_CFUNC PHP_FUNCTION(intlcal_field_difference) +PHP_FUNCTION(intlcal_field_difference) { zend_long field; double when; @@ -569,19 +566,19 @@ U_CFUNC PHP_FUNCTION(intlcal_field_difference) RETURN_LONG((zend_long)result); } -U_CFUNC PHP_FUNCTION(intlcal_get_actual_maximum) +PHP_FUNCTION(intlcal_get_actual_maximum) { _php_intlcal_field_uec_ret_in32t_method(&Calendar::getActualMaximum, INTERNAL_FUNCTION_PARAM_PASSTHRU); } -U_CFUNC PHP_FUNCTION(intlcal_get_actual_minimum) +PHP_FUNCTION(intlcal_get_actual_minimum) { _php_intlcal_field_uec_ret_in32t_method(&Calendar::getActualMinimum, INTERNAL_FUNCTION_PARAM_PASSTHRU); } -U_CFUNC PHP_FUNCTION(intlcal_get_day_of_week_type) +PHP_FUNCTION(intlcal_get_day_of_week_type) { zend_long dow; CALENDAR_METHOD_INIT_VARS; @@ -602,7 +599,7 @@ U_CFUNC PHP_FUNCTION(intlcal_get_day_of_week_type) RETURN_LONG((zend_long)result); } -U_CFUNC PHP_FUNCTION(intlcal_get_first_day_of_week) +PHP_FUNCTION(intlcal_get_first_day_of_week) { CALENDAR_METHOD_INIT_VARS; @@ -641,19 +638,19 @@ static void _php_intlcal_field_ret_in32t_method( RETURN_LONG((zend_long)result); } -U_CFUNC PHP_FUNCTION(intlcal_get_greatest_minimum) +PHP_FUNCTION(intlcal_get_greatest_minimum) { _php_intlcal_field_ret_in32t_method(&Calendar::getGreatestMinimum, INTERNAL_FUNCTION_PARAM_PASSTHRU); } -U_CFUNC PHP_FUNCTION(intlcal_get_least_maximum) +PHP_FUNCTION(intlcal_get_least_maximum) { _php_intlcal_field_ret_in32t_method(&Calendar::getLeastMaximum, INTERNAL_FUNCTION_PARAM_PASSTHRU); } -U_CFUNC PHP_FUNCTION(intlcal_get_locale) +PHP_FUNCTION(intlcal_get_locale) { zend_long locale_type; CALENDAR_METHOD_INIT_VARS; @@ -677,13 +674,13 @@ U_CFUNC PHP_FUNCTION(intlcal_get_locale) RETURN_STRING(locale.getName()); } -U_CFUNC PHP_FUNCTION(intlcal_get_maximum) +PHP_FUNCTION(intlcal_get_maximum) { _php_intlcal_field_ret_in32t_method(&Calendar::getMaximum, INTERNAL_FUNCTION_PARAM_PASSTHRU); } -U_CFUNC PHP_FUNCTION(intlcal_get_minimal_days_in_first_week) +PHP_FUNCTION(intlcal_get_minimal_days_in_first_week) { CALENDAR_METHOD_INIT_VARS; @@ -701,13 +698,13 @@ U_CFUNC PHP_FUNCTION(intlcal_get_minimal_days_in_first_week) RETURN_LONG((zend_long)result); } -U_CFUNC PHP_FUNCTION(intlcal_get_minimum) +PHP_FUNCTION(intlcal_get_minimum) { _php_intlcal_field_ret_in32t_method(&Calendar::getMinimum, INTERNAL_FUNCTION_PARAM_PASSTHRU); } -U_CFUNC PHP_FUNCTION(intlcal_get_time_zone) +PHP_FUNCTION(intlcal_get_time_zone) { CALENDAR_METHOD_INIT_VARS; @@ -728,7 +725,7 @@ U_CFUNC PHP_FUNCTION(intlcal_get_time_zone) timezone_object_construct(tz, return_value, 1); } -U_CFUNC PHP_FUNCTION(intlcal_get_type) +PHP_FUNCTION(intlcal_get_type) { CALENDAR_METHOD_INIT_VARS; @@ -742,7 +739,7 @@ U_CFUNC PHP_FUNCTION(intlcal_get_type) RETURN_STRING(co->ucal->getType()); } -U_CFUNC PHP_FUNCTION(intlcal_get_weekend_transition) +PHP_FUNCTION(intlcal_get_weekend_transition) { zend_long dow; CALENDAR_METHOD_INIT_VARS; @@ -763,7 +760,7 @@ U_CFUNC PHP_FUNCTION(intlcal_get_weekend_transition) RETURN_LONG((zend_long)res); } -U_CFUNC PHP_FUNCTION(intlcal_in_daylight_time) +PHP_FUNCTION(intlcal_in_daylight_time) { CALENDAR_METHOD_INIT_VARS; @@ -780,7 +777,7 @@ U_CFUNC PHP_FUNCTION(intlcal_in_daylight_time) RETURN_BOOL((int)ret); } -U_CFUNC PHP_FUNCTION(intlcal_is_equivalent_to) +PHP_FUNCTION(intlcal_is_equivalent_to) { zval *other_object; Calendar_object *other_co; @@ -803,7 +800,7 @@ U_CFUNC PHP_FUNCTION(intlcal_is_equivalent_to) RETURN_BOOL((int)co->ucal->isEquivalentTo(*other_co->ucal)); } -U_CFUNC PHP_FUNCTION(intlcal_is_lenient) +PHP_FUNCTION(intlcal_is_lenient) { CALENDAR_METHOD_INIT_VARS; @@ -817,7 +814,7 @@ U_CFUNC PHP_FUNCTION(intlcal_is_lenient) RETURN_BOOL((int)co->ucal->isLenient()); } -U_CFUNC PHP_FUNCTION(intlcal_is_set) +PHP_FUNCTION(intlcal_is_set) { zend_long field; CALENDAR_METHOD_INIT_VARS; @@ -834,7 +831,7 @@ U_CFUNC PHP_FUNCTION(intlcal_is_set) RETURN_BOOL((int)co->ucal->isSet((UCalendarDateFields)field)); } -U_CFUNC PHP_FUNCTION(intlcal_is_weekend) +PHP_FUNCTION(intlcal_is_weekend) { double date; bool date_is_null = 1; @@ -857,7 +854,7 @@ U_CFUNC PHP_FUNCTION(intlcal_is_weekend) } -U_CFUNC PHP_FUNCTION(intlcal_set_first_day_of_week) +PHP_FUNCTION(intlcal_set_first_day_of_week) { zend_long dow; CALENDAR_METHOD_INIT_VARS; @@ -876,7 +873,7 @@ U_CFUNC PHP_FUNCTION(intlcal_set_first_day_of_week) RETURN_TRUE; } -U_CFUNC PHP_FUNCTION(intlcal_set_lenient) +PHP_FUNCTION(intlcal_set_lenient) { bool is_lenient; CALENDAR_METHOD_INIT_VARS; @@ -893,7 +890,7 @@ U_CFUNC PHP_FUNCTION(intlcal_set_lenient) RETURN_TRUE; } -U_CFUNC PHP_FUNCTION(intlcal_set_minimal_days_in_first_week) +PHP_FUNCTION(intlcal_set_minimal_days_in_first_week) { zend_long num_days; CALENDAR_METHOD_INIT_VARS; @@ -916,7 +913,7 @@ U_CFUNC PHP_FUNCTION(intlcal_set_minimal_days_in_first_week) RETURN_TRUE; } -U_CFUNC PHP_FUNCTION(intlcal_equals) +PHP_FUNCTION(intlcal_equals) { zval *other_object; Calendar_object *other_co; @@ -941,7 +938,7 @@ U_CFUNC PHP_FUNCTION(intlcal_equals) RETURN_BOOL((int)result); } -U_CFUNC PHP_FUNCTION(intlcal_get_repeated_wall_time_option) +PHP_FUNCTION(intlcal_get_repeated_wall_time_option) { CALENDAR_METHOD_INIT_VARS; @@ -955,7 +952,7 @@ U_CFUNC PHP_FUNCTION(intlcal_get_repeated_wall_time_option) RETURN_LONG(co->ucal->getRepeatedWallTimeOption()); } -U_CFUNC PHP_FUNCTION(intlcal_get_skipped_wall_time_option) +PHP_FUNCTION(intlcal_get_skipped_wall_time_option) { CALENDAR_METHOD_INIT_VARS; @@ -969,7 +966,7 @@ U_CFUNC PHP_FUNCTION(intlcal_get_skipped_wall_time_option) RETURN_LONG(co->ucal->getSkippedWallTimeOption()); } -U_CFUNC PHP_FUNCTION(intlcal_set_repeated_wall_time_option) +PHP_FUNCTION(intlcal_set_repeated_wall_time_option) { zend_long option; CALENDAR_METHOD_INIT_VARS; @@ -992,7 +989,7 @@ U_CFUNC PHP_FUNCTION(intlcal_set_repeated_wall_time_option) RETURN_TRUE; } -U_CFUNC PHP_FUNCTION(intlcal_set_skipped_wall_time_option) +PHP_FUNCTION(intlcal_set_skipped_wall_time_option) { zend_long option; CALENDAR_METHOD_INIT_VARS; @@ -1016,7 +1013,7 @@ U_CFUNC PHP_FUNCTION(intlcal_set_skipped_wall_time_option) RETURN_TRUE; } -U_CFUNC PHP_FUNCTION(intlcal_from_date_time) +PHP_FUNCTION(intlcal_from_date_time) { zend_object *date_obj; zend_string *date_str; @@ -1100,7 +1097,7 @@ U_CFUNC PHP_FUNCTION(intlcal_from_date_time) } } -U_CFUNC PHP_FUNCTION(intlcal_to_date_time) +PHP_FUNCTION(intlcal_to_date_time) { zval retval; CALENDAR_METHOD_INIT_VARS; @@ -1175,7 +1172,7 @@ U_CFUNC PHP_FUNCTION(intlcal_to_date_time) zval_ptr_dtor(&retval); } -U_CFUNC PHP_FUNCTION(intlcal_get_error_code) +PHP_FUNCTION(intlcal_get_error_code) { CALENDAR_METHOD_INIT_VARS; @@ -1192,7 +1189,7 @@ U_CFUNC PHP_FUNCTION(intlcal_get_error_code) RETURN_LONG((zend_long)CALENDAR_ERROR_CODE(co)); } -U_CFUNC PHP_FUNCTION(intlcal_get_error_message) +PHP_FUNCTION(intlcal_get_error_message) { zend_string* message = NULL; CALENDAR_METHOD_INIT_VARS; diff --git a/ext/intl/calendar/gregoriancalendar_methods.cpp b/ext/intl/calendar/gregoriancalendar_methods.cpp index 0cc3a94d4c568..be5da41bbeda9 100644 --- a/ext/intl/calendar/gregoriancalendar_methods.cpp +++ b/ext/intl/calendar/gregoriancalendar_methods.cpp @@ -24,7 +24,6 @@ #include #include -extern "C" { #include "../php_intl.h" #include "../intl_common.h" #define USE_TIMEZONE_POINTER 1 @@ -33,7 +32,6 @@ extern "C" { #include "calendar_class.h" #include #include "zend_exceptions.h" -} using icu::GregorianCalendar; using icu::Locale; @@ -207,13 +205,13 @@ static void _php_intlgregcal_constructor_body(INTERNAL_FUNCTION_PARAMETERS, bool co->ucal = gcal.release(); } -U_CFUNC PHP_FUNCTION(intlgregcal_create_instance) +PHP_FUNCTION(intlgregcal_create_instance) { object_init_ex(return_value, GregorianCalendar_ce_ptr); _php_intlgregcal_constructor_body(INTERNAL_FUNCTION_PARAM_PASSTHRU, /* is_constructor */ false); } -U_CFUNC PHP_METHOD(IntlGregorianCalendar, __construct) +PHP_METHOD(IntlGregorianCalendar, __construct) { const bool old_use_exception = INTL_G(use_exceptions); const zend_long old_error_level = INTL_G(error_level); @@ -226,7 +224,7 @@ U_CFUNC PHP_METHOD(IntlGregorianCalendar, __construct) INTL_G(error_level) = old_error_level; } -U_CFUNC PHP_METHOD(IntlGregorianCalendar, createFromDate) +PHP_METHOD(IntlGregorianCalendar, createFromDate) { zend_long year, month, day; UErrorCode status = U_ZERO_ERROR; @@ -263,7 +261,7 @@ U_CFUNC PHP_METHOD(IntlGregorianCalendar, createFromDate) INTL_G(error_level) = old_error_level; } -U_CFUNC PHP_METHOD(IntlGregorianCalendar, createFromDateTime) +PHP_METHOD(IntlGregorianCalendar, createFromDateTime) { zend_long year, month, day, hour, minute, second; bool second_is_null = 1; @@ -313,7 +311,7 @@ U_CFUNC PHP_METHOD(IntlGregorianCalendar, createFromDateTime) INTL_G(error_level) = old_error_level; } -U_CFUNC PHP_FUNCTION(intlgregcal_set_gregorian_change) +PHP_FUNCTION(intlgregcal_set_gregorian_change) { double date; CALENDAR_METHOD_INIT_VARS; @@ -332,7 +330,7 @@ U_CFUNC PHP_FUNCTION(intlgregcal_set_gregorian_change) RETURN_TRUE; } -U_CFUNC PHP_FUNCTION(intlgregcal_get_gregorian_change) +PHP_FUNCTION(intlgregcal_get_gregorian_change) { CALENDAR_METHOD_INIT_VARS; @@ -347,7 +345,7 @@ U_CFUNC PHP_FUNCTION(intlgregcal_get_gregorian_change) RETURN_DOUBLE((double)fetch_greg(co)->getGregorianChange()); } -U_CFUNC PHP_FUNCTION(intlgregcal_is_leap_year) +PHP_FUNCTION(intlgregcal_is_leap_year) { zend_long year; CALENDAR_METHOD_INIT_VARS; diff --git a/ext/intl/collator/collator_attr.cpp b/ext/intl/collator/collator_attr.cpp index f56596deb6b0e..f860bc260a175 100644 --- a/ext/intl/collator/collator_attr.cpp +++ b/ext/intl/collator/collator_attr.cpp @@ -22,16 +22,14 @@ #include #endif -extern "C" { #include "php_intl.h" -} #include "collator_class.h" #include "collator_convert.h" #include /* {{{ Get collation attribute value. */ -U_CFUNC PHP_FUNCTION( collator_get_attribute ) +PHP_FUNCTION( collator_get_attribute ) { zend_long attribute, value; @@ -55,7 +53,7 @@ U_CFUNC PHP_FUNCTION( collator_get_attribute ) /* }}} */ /* {{{ Set collation attribute. */ -U_CFUNC PHP_FUNCTION( collator_set_attribute ) +PHP_FUNCTION( collator_set_attribute ) { zend_long attribute, value; COLLATOR_METHOD_INIT_VARS @@ -80,7 +78,7 @@ U_CFUNC PHP_FUNCTION( collator_set_attribute ) /* }}} */ /* {{{ Returns the current collation strength. */ -U_CFUNC PHP_FUNCTION( collator_get_strength ) +PHP_FUNCTION( collator_get_strength ) { COLLATOR_METHOD_INIT_VARS @@ -100,7 +98,7 @@ U_CFUNC PHP_FUNCTION( collator_get_strength ) /* }}} */ /* {{{ Set the collation strength. */ -U_CFUNC PHP_FUNCTION( collator_set_strength ) +PHP_FUNCTION( collator_set_strength ) { zend_long strength; diff --git a/ext/intl/collator/collator_class.cpp b/ext/intl/collator/collator_class.cpp index 293a089c26796..4ad42fa8268b6 100644 --- a/ext/intl/collator/collator_class.cpp +++ b/ext/intl/collator/collator_class.cpp @@ -15,11 +15,9 @@ #include "collator.h" #include "collator_class.h" -extern "C" { #include "php_intl.h" #include "intl_error.h" #include "collator_arginfo.h" -} #include "collator_sort.h" #include "collator_convert.h" @@ -45,7 +43,7 @@ void Collator_objects_free(zend_object *object ) /* }}} */ /* {{{ Collator_object_create */ -U_CFUNC zend_object *Collator_object_create(zend_class_entry *ce ) +zend_object *Collator_object_create(zend_class_entry *ce ) { Collator_object *intern = reinterpret_cast(zend_object_alloc(sizeof(Collator_object), ce)); intl_error_init(COLLATOR_ERROR_P(intern)); @@ -63,7 +61,7 @@ U_CFUNC zend_object *Collator_object_create(zend_class_entry *ce ) /* {{{ collator_register_Collator_symbols * Initialize 'Collator' class */ -U_CFUNC void collator_register_Collator_symbols(int module_number) +void collator_register_Collator_symbols(int module_number) { register_collator_symbols(module_number); @@ -86,7 +84,7 @@ U_CFUNC void collator_register_Collator_symbols(int module_number) * Initialize internals of Collator_object. * Must be called before any other call to 'collator_object_...' functions. */ -U_CFUNC void collator_object_init( Collator_object* co ) +void collator_object_init( Collator_object* co ) { if( !co ) return; @@ -98,7 +96,7 @@ U_CFUNC void collator_object_init( Collator_object* co ) /* {{{ void collator_object_destroy( Collator_object* co ) * Clean up mem allocted by internals of Collator_object */ -U_CFUNC void collator_object_destroy( Collator_object* co ) +void collator_object_destroy( Collator_object* co ) { if( !co ) return; diff --git a/ext/intl/collator/collator_class.h b/ext/intl/collator/collator_class.h index a281b2bec8ada..311ab5623db4e 100644 --- a/ext/intl/collator/collator_class.h +++ b/ext/intl/collator/collator_class.h @@ -18,15 +18,9 @@ #include -#ifdef __cplusplus -extern "C" { -#endif #include "../intl_common.h" #include "../intl_error.h" #include "../intl_data.h" -#ifdef __cplusplus -} -#endif #include @@ -52,15 +46,9 @@ static inline Collator_object *php_intl_collator_fetch_object(zend_object *obj) } #define Z_INTL_COLLATOR_P(zv) php_intl_collator_fetch_object(Z_OBJ_P(zv)) -#ifdef __cplusplus -extern "C" { -#endif void collator_register_Collator_symbols(int module_number); void collator_object_init( Collator_object* co ); void collator_object_destroy( Collator_object* co ); -#ifdef __cplusplus -} -#endif extern zend_class_entry *Collator_ce_ptr; diff --git a/ext/intl/collator/collator_compare.cpp b/ext/intl/collator/collator_compare.cpp index 38e283a6d8530..8db52899c2d0e 100644 --- a/ext/intl/collator/collator_compare.cpp +++ b/ext/intl/collator/collator_compare.cpp @@ -22,14 +22,12 @@ #include #endif -extern "C" { #include "php_intl.h" #include "intl_convert.h" -} #include "collator_class.h" /* {{{ Compare two strings. */ -U_CFUNC PHP_FUNCTION( collator_compare ) +PHP_FUNCTION( collator_compare ) { char* str1 = NULL; char* str2 = NULL; diff --git a/ext/intl/collator/collator_convert.cpp b/ext/intl/collator/collator_convert.cpp index d4de15aa0b822..1a00eb83c983d 100644 --- a/ext/intl/collator/collator_convert.cpp +++ b/ext/intl/collator/collator_convert.cpp @@ -22,10 +22,8 @@ #include #endif -extern "C" { #include "php_intl.h" #include "intl_convert.h" -} #include "collator_class.h" #include "collator_is_numeric.h" #include "collator_convert.h" @@ -113,7 +111,7 @@ static void collator_convert_hash_item_from_utf16_to_utf8( /* {{{ collator_convert_hash_from_utf8_to_utf16 * Convert values of the given hash from UTF-8 encoding to UTF-16LE. */ -U_CFUNC void collator_convert_hash_from_utf8_to_utf16( HashTable* hash, UErrorCode* status ) +void collator_convert_hash_from_utf8_to_utf16( HashTable* hash, UErrorCode* status ) { zend_ulong hashIndex; zval *hashData; @@ -132,7 +130,7 @@ U_CFUNC void collator_convert_hash_from_utf8_to_utf16( HashTable* hash, UErrorCo /* {{{ collator_convert_hash_from_utf16_to_utf8 * Convert values of the given hash from UTF-16LE encoding to UTF-8. */ -U_CFUNC void collator_convert_hash_from_utf16_to_utf8( HashTable* hash, UErrorCode* status ) +void collator_convert_hash_from_utf16_to_utf8( HashTable* hash, UErrorCode* status ) { zend_ulong hashIndex; zend_string *hashKey; @@ -157,7 +155,7 @@ U_CFUNC void collator_convert_hash_from_utf16_to_utf8( HashTable* hash, UErrorCo * * @return zval* Converted string. */ -U_CFUNC zval* collator_convert_zstr_utf16_to_utf8( zval* utf16_zval, zval *rv ) +zval* collator_convert_zstr_utf16_to_utf8( zval* utf16_zval, zval *rv ) { zend_string* u8str; UErrorCode status = U_ZERO_ERROR; @@ -175,7 +173,7 @@ U_CFUNC zval* collator_convert_zstr_utf16_to_utf8( zval* utf16_zval, zval *rv ) } /* }}} */ -U_CFUNC zend_string *collator_convert_zstr_utf8_to_utf16(zend_string *utf8_str) +zend_string *collator_convert_zstr_utf8_to_utf16(zend_string *utf8_str) { UErrorCode status = U_ZERO_ERROR; @@ -196,7 +194,7 @@ U_CFUNC zend_string *collator_convert_zstr_utf8_to_utf16(zend_string *utf8_str) /* {{{ collator_convert_object_to_string * Convert object to UTF16-encoded string. */ -U_CFUNC zval* collator_convert_object_to_string( zval* obj, zval *rv ) +zval* collator_convert_object_to_string( zval* obj, zval *rv ) { zval* zstr = nullptr; UErrorCode status = U_ZERO_ERROR; @@ -251,7 +249,7 @@ U_CFUNC zval* collator_convert_object_to_string( zval* obj, zval *rv ) * * @return zval* Number. If str is not numeric string return number zero. */ -U_CFUNC zval* collator_convert_string_to_number( zval* str, zval *rv ) +zval* collator_convert_string_to_number( zval* str, zval *rv ) { zval* num = collator_convert_string_to_number_if_possible( str, rv ); if( num == str ) @@ -275,7 +273,7 @@ U_CFUNC zval* collator_convert_string_to_number( zval* str, zval *rv ) * * @return zval* Number. If str is not numeric string return number zero. */ -U_CFUNC zval* collator_convert_string_to_double( zval* str, zval *rv ) +zval* collator_convert_string_to_double( zval* str, zval *rv ) { zval* num = collator_convert_string_to_number( str, rv ); if( Z_TYPE_P(num) == IS_LONG ) @@ -296,7 +294,7 @@ U_CFUNC zval* collator_convert_string_to_double( zval* str, zval *rv ) * @return zval* Number if str is numeric string. Otherwise * original str param. */ -U_CFUNC zval* collator_convert_string_to_number_if_possible( zval* str, zval *rv ) +zval* collator_convert_string_to_number_if_possible( zval* str, zval *rv ) { uint8_t is_numeric = 0; zend_long lval = 0; @@ -330,7 +328,7 @@ U_CFUNC zval* collator_convert_string_to_number_if_possible( zval* str, zval *rv * * @return zend_string* UTF16 string. */ -U_CFUNC zend_string *collator_zval_to_string(zval *arg) +zend_string *collator_zval_to_string(zval *arg) { // TODO: This is extremely weird in that it leaves pre-existing strings alone and does not // perform a UTF-8 to UTF-16 conversion for them. The assumption is that values that are @@ -354,7 +352,7 @@ U_CFUNC zend_string *collator_zval_to_string(zval *arg) * @return zval* Normalized copy of arg or unmodified arg * if normalization is not needed. */ -U_CFUNC zval* collator_normalize_sort_argument( zval* arg, zval *rv ) +zval* collator_normalize_sort_argument( zval* arg, zval *rv ) { zval* n_arg = nullptr; diff --git a/ext/intl/collator/collator_convert.h b/ext/intl/collator/collator_convert.h index 8c5356095b7a1..1d58560964399 100644 --- a/ext/intl/collator/collator_convert.h +++ b/ext/intl/collator/collator_convert.h @@ -19,9 +19,6 @@ #include #include -#ifdef __cplusplus -extern "C" { -#endif void collator_convert_hash_from_utf8_to_utf16( HashTable* hash, UErrorCode* status ); void collator_convert_hash_from_utf16_to_utf8( HashTable* hash, UErrorCode* status ); @@ -35,8 +32,5 @@ zval* collator_convert_string_to_number_if_possible( zval* str, zval *rv ); zval* collator_convert_string_to_double( zval* str, zval *rv ); zend_string *collator_zval_to_string(zval *arg); -#ifdef __cplusplus -} -#endif #endif // COLLATOR_CONVERT_H diff --git a/ext/intl/collator/collator_create.cpp b/ext/intl/collator/collator_create.cpp index 59280bcdbed5e..17085f5e1cefa 100644 --- a/ext/intl/collator/collator_create.cpp +++ b/ext/intl/collator/collator_create.cpp @@ -22,9 +22,7 @@ #include #endif -extern "C" { #include "php_intl.h" -} #include "collator_class.h" #include "intl_data.h" @@ -57,7 +55,7 @@ static int collator_ctor(INTERNAL_FUNCTION_PARAMETERS) /* }}} */ /* {{{ Create collator. */ -U_CFUNC PHP_FUNCTION( collator_create ) +PHP_FUNCTION( collator_create ) { object_init_ex( return_value, Collator_ce_ptr ); if (collator_ctor(INTERNAL_FUNCTION_PARAM_PASSTHRU) == FAILURE) { @@ -68,7 +66,7 @@ U_CFUNC PHP_FUNCTION( collator_create ) /* }}} */ /* {{{ Collator object constructor. */ -U_CFUNC PHP_METHOD( Collator, __construct ) +PHP_METHOD( Collator, __construct ) { const bool old_use_exception = INTL_G(use_exceptions); const zend_long old_error_level = INTL_G(error_level); diff --git a/ext/intl/collator/collator_error.cpp b/ext/intl/collator/collator_error.cpp index aa333b5098a04..2938f3849de25 100644 --- a/ext/intl/collator/collator_error.cpp +++ b/ext/intl/collator/collator_error.cpp @@ -22,13 +22,11 @@ #include #endif -extern "C" { #include "php_intl.h" -} #include "collator_class.h" /* {{{ Get collator's last error code. */ -U_CFUNC PHP_FUNCTION( collator_get_error_code ) +PHP_FUNCTION( collator_get_error_code ) { COLLATOR_METHOD_INIT_VARS @@ -50,7 +48,7 @@ U_CFUNC PHP_FUNCTION( collator_get_error_code ) /* }}} */ /* {{{ Get text description for collator's last error code. */ -U_CFUNC PHP_FUNCTION( collator_get_error_message ) +PHP_FUNCTION( collator_get_error_message ) { zend_string* message = nullptr; diff --git a/ext/intl/collator/collator_locale.cpp b/ext/intl/collator/collator_locale.cpp index 67b3d1342cc75..692776bf4ff7a 100644 --- a/ext/intl/collator/collator_locale.cpp +++ b/ext/intl/collator/collator_locale.cpp @@ -22,16 +22,14 @@ #include #endif -extern "C" { #include "php_intl.h" -} #include "collator_class.h" #include "intl_convert.h" #include /* {{{ Gets the locale name of the collator. */ -U_CFUNC PHP_FUNCTION( collator_get_locale ) +PHP_FUNCTION( collator_get_locale ) { zend_long type = 0; char* locale_name = nullptr; diff --git a/ext/intl/collator/collator_sort.cpp b/ext/intl/collator/collator_sort.cpp index 003d7f45a837f..0df6cc4f94edb 100644 --- a/ext/intl/collator/collator_sort.cpp +++ b/ext/intl/collator/collator_sort.cpp @@ -22,10 +22,8 @@ #include #endif -extern "C" { #include "php_intl.h" #include "intl_convert.h" -} #include "collator.h" #include "collator_class.h" #include "collator_sort.h" @@ -309,7 +307,7 @@ static void collator_sort_internal( int renumber, INTERNAL_FUNCTION_PARAMETERS ) /* }}} */ /* {{{ Sort array using specified collator. */ -U_CFUNC PHP_FUNCTION( collator_sort ) +PHP_FUNCTION( collator_sort ) { collator_sort_internal( true, INTERNAL_FUNCTION_PARAM_PASSTHRU ); } @@ -327,7 +325,7 @@ static void collator_sortkey_swap(collator_sort_key_index_t *p, collator_sort_ke /* {{{ Equivalent to standard PHP sort using Collator. * Uses ICU ucol_getSortKey for performance. */ -U_CFUNC PHP_FUNCTION( collator_sort_with_sort_keys ) +PHP_FUNCTION( collator_sort_with_sort_keys ) { zval* array = nullptr; zval garbage; @@ -492,14 +490,14 @@ U_CFUNC PHP_FUNCTION( collator_sort_with_sort_keys ) /* }}} */ /* {{{ Sort array using specified collator, maintaining index association. */ -U_CFUNC PHP_FUNCTION( collator_asort ) +PHP_FUNCTION( collator_asort ) { collator_sort_internal( false, INTERNAL_FUNCTION_PARAM_PASSTHRU ); } /* }}} */ /* {{{ Get a sort key for a string from a Collator. */ -U_CFUNC PHP_FUNCTION( collator_get_sort_key ) +PHP_FUNCTION( collator_get_sort_key ) { char* str = nullptr; size_t str_len = 0; diff --git a/ext/intl/common/common_date.cpp b/ext/intl/common/common_date.cpp index f2ca077554b49..55c66b667bba2 100644 --- a/ext/intl/common/common_date.cpp +++ b/ext/intl/common/common_date.cpp @@ -16,12 +16,10 @@ #include -extern "C" { #include "../php_intl.h" #define USE_CALENDAR_POINTER 1 #include "../calendar/calendar_class.h" #include -} using icu::TimeZone; using icu::UnicodeString; @@ -30,7 +28,7 @@ using icu::UnicodeString; /* {{{ timezone_convert_datetimezone * The timezone in DateTime and DateTimeZone is not unified. */ -U_CFUNC TimeZone *timezone_convert_datetimezone( +TimeZone *timezone_convert_datetimezone( int type, void *object, bool is_datetime, intl_error *outside_error) { @@ -88,7 +86,7 @@ U_CFUNC TimeZone *timezone_convert_datetimezone( } /* }}} */ -U_CFUNC zend_result intl_datetime_decompose(zend_object *obj, double *millis, TimeZone **tz, +zend_result intl_datetime_decompose(zend_object *obj, double *millis, TimeZone **tz, intl_error *err) { char *message; @@ -152,7 +150,7 @@ U_CFUNC zend_result intl_datetime_decompose(zend_object *obj, double *millis, Ti return SUCCESS; } -U_CFUNC double intl_zval_to_millis(zval *z, intl_error *err) +double intl_zval_to_millis(zval *z, intl_error *err) { double rv = ZEND_NAN; zend_long lv; diff --git a/ext/intl/common/common_date.h b/ext/intl/common/common_date.h index 988f279294c3c..7d9e801436c0d 100644 --- a/ext/intl/common/common_date.h +++ b/ext/intl/common/common_date.h @@ -17,10 +17,8 @@ #include -U_CDECL_BEGIN #include #include "../intl_error.h" -U_CDECL_END #ifdef __cplusplus @@ -31,11 +29,11 @@ U_CDECL_END using icu::TimeZone; -U_CFUNC TimeZone *timezone_convert_datetimezone(int type, void *object, bool is_datetime, intl_error *outside_error); -U_CFUNC zend_result intl_datetime_decompose(zend_object *obj, double *millis, TimeZone **tz, intl_error *err); +TimeZone *timezone_convert_datetimezone(int type, void *object, bool is_datetime, intl_error *outside_error); +zend_result intl_datetime_decompose(zend_object *obj, double *millis, TimeZone **tz, intl_error *err); #endif -U_CFUNC double intl_zval_to_millis(zval *z, intl_error *err); +double intl_zval_to_millis(zval *z, intl_error *err); #endif /* COMMON_DATE_H */ diff --git a/ext/intl/common/common_enum.cpp b/ext/intl/common/common_enum.cpp index 8cf9796717f4e..5af5aee258a19 100644 --- a/ext/intl/common/common_enum.cpp +++ b/ext/intl/common/common_enum.cpp @@ -21,17 +21,13 @@ // Fix build on Windows/old versions of ICU #include -extern "C" { #include -} #include "common_enum.h" #include "common_arginfo.h" -extern "C" { #include #include -} zend_class_entry *IntlIterator_ce_ptr; zend_object_handlers IntlIterator_handlers; @@ -43,17 +39,17 @@ void zoi_with_current_dtor(zend_object_iterator *iter) ZVAL_UNDEF(&zoiwc->wrapping_obj); } -U_CFUNC zend_result zoi_with_current_valid(zend_object_iterator *iter) +zend_result zoi_with_current_valid(zend_object_iterator *iter) { return Z_ISUNDEF(((zoi_with_current*)iter)->current)? FAILURE : SUCCESS; } -U_CFUNC zval *zoi_with_current_get_current_data(zend_object_iterator *iter) +zval *zoi_with_current_get_current_data(zend_object_iterator *iter) { return &((zoi_with_current*)iter)->current; } -U_CFUNC void zoi_with_current_invalidate_current(zend_object_iterator *iter) +void zoi_with_current_invalidate_current(zend_object_iterator *iter) { zoi_with_current *zoi_iter = (zoi_with_current*)iter; if (!Z_ISUNDEF(zoi_iter->current)) { @@ -130,7 +126,7 @@ static const zend_object_iterator_funcs string_enum_object_iterator_funcs = { zoi_with_current_get_gc, }; -U_CFUNC void IntlIterator_from_StringEnumeration(StringEnumeration *se, zval *object) +void IntlIterator_from_StringEnumeration(StringEnumeration *se, zval *object) { IntlIterator_object *ii; object_init_ex(object, IntlIterator_ce_ptr); @@ -284,7 +280,7 @@ PHP_METHOD(IntlIterator, valid) RETURN_BOOL(ii->iterator->funcs->valid(ii->iterator) == SUCCESS); } -U_CFUNC void intl_register_common_symbols(int module_number) +void intl_register_common_symbols(int module_number) { /* Create and register 'IntlIterator' class. */ IntlIterator_ce_ptr = register_class_IntlIterator(zend_ce_iterator); diff --git a/ext/intl/common/common_enum.h b/ext/intl/common/common_enum.h index 6f08285289019..8e55dcfcd90c0 100644 --- a/ext/intl/common/common_enum.h +++ b/ext/intl/common/common_enum.h @@ -17,17 +17,11 @@ #define INTL_COMMON_ENUM_H #include -#ifdef __cplusplus #include -extern "C" { #include -#endif #include #include "../intl_error.h" #include "../intl_data.h" -#ifdef __cplusplus -} -#endif #define INTLITERATOR_ERROR(ii) (ii)->err #define INTLITERATOR_ERROR_P(ii) &(INTLITERATOR_ERROR(ii)) @@ -67,17 +61,15 @@ typedef struct { extern zend_class_entry *IntlIterator_ce_ptr; extern zend_object_handlers IntlIterator_handlers; -U_CFUNC void zoi_with_current_dtor(zend_object_iterator *iter); -U_CFUNC zend_result zoi_with_current_valid(zend_object_iterator *iter); -U_CFUNC zval *zoi_with_current_get_current_data(zend_object_iterator *iter); -U_CFUNC void zoi_with_current_invalidate_current(zend_object_iterator *iter); -U_CFUNC HashTable *zoi_with_current_get_gc(zend_object_iterator *iter, zval **table, int *n); +void zoi_with_current_dtor(zend_object_iterator *iter); +zend_result zoi_with_current_valid(zend_object_iterator *iter); +zval *zoi_with_current_get_current_data(zend_object_iterator *iter); +void zoi_with_current_invalidate_current(zend_object_iterator *iter); +HashTable *zoi_with_current_get_gc(zend_object_iterator *iter, zval **table, int *n); -#ifdef __cplusplus using icu::StringEnumeration; -U_CFUNC void IntlIterator_from_StringEnumeration(StringEnumeration *se, zval *object); -#endif +void IntlIterator_from_StringEnumeration(StringEnumeration *se, zval *object); -U_CFUNC void intl_register_common_symbols(int module_number); +void intl_register_common_symbols(int module_number); #endif // INTL_COMMON_ENUM_H diff --git a/ext/intl/common/common_error.cpp b/ext/intl/common/common_error.cpp index cb12d8dff8f3d..3f0d16ba73e81 100644 --- a/ext/intl/common/common_error.cpp +++ b/ext/intl/common/common_error.cpp @@ -17,13 +17,11 @@ #include #endif -extern "C" { #include "php_intl.h" #include "intl_error.h" -} /* {{{ Get code of the last occurred error. */ -U_CFUNC PHP_FUNCTION( intl_get_error_code ) +PHP_FUNCTION( intl_get_error_code ) { ZEND_PARSE_PARAMETERS_NONE(); @@ -32,7 +30,7 @@ U_CFUNC PHP_FUNCTION( intl_get_error_code ) /* }}} */ /* {{{ Get text description of the last occurred error. */ -U_CFUNC PHP_FUNCTION( intl_get_error_message ) +PHP_FUNCTION( intl_get_error_message ) { ZEND_PARSE_PARAMETERS_NONE(); @@ -44,7 +42,7 @@ U_CFUNC PHP_FUNCTION( intl_get_error_message ) * Returns true if it does, and false if the code * indicates success or a warning. */ -U_CFUNC PHP_FUNCTION( intl_is_failure ) +PHP_FUNCTION( intl_is_failure ) { zend_long err_code; @@ -59,7 +57,7 @@ U_CFUNC PHP_FUNCTION( intl_is_failure ) /* {{{ Return a string for a given error code. * The string will be the same as the name of the error code constant. */ -U_CFUNC PHP_FUNCTION( intl_error_name ) +PHP_FUNCTION( intl_error_name ) { zend_long err_code; diff --git a/ext/intl/config.m4 b/ext/intl/config.m4 index 7251f22835349..110007248993d 100644 --- a/ext/intl/config.m4 +++ b/ext/intl/config.m4 @@ -8,16 +8,15 @@ if test "$PHP_INTL" != "no"; then PHP_SUBST([INTL_SHARED_LIBADD]) INTL_COMMON_FLAGS="$ICU_CFLAGS -Wno-write-strings -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1" PHP_NEW_EXTENSION([intl], m4_normalize([ - intl_convert.c - intl_error.c - php_intl.c + intl_convert.cpp + intl_error.cpp + php_intl.cpp ]), [$ext_shared],, [$INTL_COMMON_FLAGS], [cxx]) - PHP_INTL_CXX_SOURCES="intl_convertcpp.cpp \ - collator/collator_attr.cpp \ + PHP_INTL_CXX_SOURCES="collator/collator_attr.cpp \ collator/collator_class.cpp \ collator/collator_compare.cpp \ collator/collator_convert.cpp \ diff --git a/ext/intl/config.w32 b/ext/intl/config.w32 index d5c86d1236712..4d51b4cc1775b 100644 --- a/ext/intl/config.w32 +++ b/ext/intl/config.w32 @@ -9,7 +9,7 @@ if (PHP_INTL != "no") { CHECK_LIB("icuuc.lib", "intl", PHP_INTL) && CHECK_HEADER_ADD_INCLUDE("unicode/utf.h", "CFLAGS_INTL")) { // always build as shared - zend_strtod.c/ICU type conflict - EXTENSION("intl", "php_intl.c intl_convert.c intl_convertcpp.cpp intl_error.c ", true, + EXTENSION("intl", "php_intl.cpp intl_convert.cpp intl_error.cpp ", true, "/I \"" + configure_module_dirname + "\" /DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"); ADD_EXTENSION_DEP('intl', 'date'); ADD_SOURCES(configure_module_dirname + "/collator", "\ diff --git a/ext/intl/converter/converter.cpp b/ext/intl/converter/converter.cpp index ad68909b5ea3c..231f02af4c7a3 100644 --- a/ext/intl/converter/converter.cpp +++ b/ext/intl/converter/converter.cpp @@ -20,12 +20,10 @@ #include #include -extern "C" { #include "converter.h" #include "php_intl.h" #include "../intl_error.h" #include "../intl_common.h" -} #include "converter_arginfo.h" typedef struct _php_converter_object { @@ -970,7 +968,7 @@ static zend_object *php_converter_clone_object(zend_object *object) { /* }}} */ /* {{{ php_converter_minit */ -U_CFUNC int php_converter_minit(INIT_FUNC_ARGS) { +int php_converter_minit(INIT_FUNC_ARGS) { php_converter_ce = register_class_UConverter(); php_converter_ce->create_object = php_converter_create_object; php_converter_ce->default_object_handlers = &php_converter_object_handlers; diff --git a/ext/intl/converter/converter.h b/ext/intl/converter/converter.h index 5d779560811d0..f9fb27b82a7d0 100644 --- a/ext/intl/converter/converter.h +++ b/ext/intl/converter/converter.h @@ -21,12 +21,6 @@ #include "php.h" -#ifdef __cplusplus -extern "C" { -#endif int php_converter_minit(INIT_FUNC_ARGS); -#ifdef __cplusplus -} -#endif #endif /* PHP_INTL_CONVERTER_H */ diff --git a/ext/intl/dateformat/dateformat.cpp b/ext/intl/dateformat/dateformat.cpp index cf2b445590bb9..e6ebd5b789649 100644 --- a/ext/intl/dateformat/dateformat.cpp +++ b/ext/intl/dateformat/dateformat.cpp @@ -17,14 +17,12 @@ #include -extern "C" { #include "php_intl.h" -} #include "dateformat_class.h" #include "dateformat.h" /* {{{ Get formatter's last error code. */ -U_CFUNC PHP_FUNCTION( datefmt_get_error_code ) +PHP_FUNCTION( datefmt_get_error_code ) { DATE_FORMAT_METHOD_INIT_VARS; @@ -43,7 +41,7 @@ U_CFUNC PHP_FUNCTION( datefmt_get_error_code ) /* }}} */ /* {{{ Get text description for formatter's last error code. */ -U_CFUNC PHP_FUNCTION( datefmt_get_error_message ) +PHP_FUNCTION( datefmt_get_error_message ) { zend_string *message = NULL; DATE_FORMAT_METHOD_INIT_VARS; diff --git a/ext/intl/dateformat/dateformat_attr.cpp b/ext/intl/dateformat/dateformat_attr.cpp index 1ec55a806a7ca..48bbe8ebd6bda 100644 --- a/ext/intl/dateformat/dateformat_attr.cpp +++ b/ext/intl/dateformat/dateformat_attr.cpp @@ -15,10 +15,8 @@ #include #endif -extern "C" { #include "../php_intl.h" #include "../intl_convert.h" -} #include "dateformat_class.h" #include "dateformat_class.h" @@ -26,7 +24,7 @@ extern "C" { #include /* {{{ Get formatter datetype. */ -U_CFUNC PHP_FUNCTION( datefmt_get_datetype ) +PHP_FUNCTION( datefmt_get_datetype ) { DATE_FORMAT_METHOD_INIT_VARS; @@ -46,7 +44,7 @@ U_CFUNC PHP_FUNCTION( datefmt_get_datetype ) /* }}} */ /* {{{ Get formatter timetype. */ -U_CFUNC PHP_FUNCTION( datefmt_get_timetype ) +PHP_FUNCTION( datefmt_get_timetype ) { DATE_FORMAT_METHOD_INIT_VARS; @@ -66,7 +64,7 @@ U_CFUNC PHP_FUNCTION( datefmt_get_timetype ) /* }}} */ /* {{{ Get formatter pattern. */ -U_CFUNC PHP_FUNCTION( datefmt_get_pattern ) +PHP_FUNCTION( datefmt_get_pattern ) { UChar value_buf[64]; uint32_t length = USIZE( value_buf ); @@ -102,7 +100,7 @@ U_CFUNC PHP_FUNCTION( datefmt_get_pattern ) /* }}} */ /* {{{ Set formatter pattern. */ -U_CFUNC PHP_FUNCTION( datefmt_set_pattern ) +PHP_FUNCTION( datefmt_set_pattern ) { char* value = nullptr; size_t value_len = 0; @@ -138,7 +136,7 @@ U_CFUNC PHP_FUNCTION( datefmt_set_pattern ) /* }}} */ /* {{{ Get formatter locale. */ -U_CFUNC PHP_FUNCTION( datefmt_get_locale ) +PHP_FUNCTION( datefmt_get_locale ) { const char *loc; zend_long loc_type =ULOC_ACTUAL_LOCALE; @@ -163,7 +161,7 @@ U_CFUNC PHP_FUNCTION( datefmt_get_locale ) /* }}} */ /* {{{ Get formatter isLenient. */ -U_CFUNC PHP_FUNCTION( datefmt_is_lenient ) +PHP_FUNCTION( datefmt_is_lenient ) { DATE_FORMAT_METHOD_INIT_VARS; @@ -184,7 +182,7 @@ U_CFUNC PHP_FUNCTION( datefmt_is_lenient ) /* }}} */ /* {{{ Set formatter lenient. */ -U_CFUNC PHP_FUNCTION( datefmt_set_lenient ) +PHP_FUNCTION( datefmt_set_lenient ) { bool isLenient = false; diff --git a/ext/intl/dateformat/dateformat_attrcpp.cpp b/ext/intl/dateformat/dateformat_attrcpp.cpp index 13dadc9c96973..694ef2d4c4d12 100644 --- a/ext/intl/dateformat/dateformat_attrcpp.cpp +++ b/ext/intl/dateformat/dateformat_attrcpp.cpp @@ -18,16 +18,14 @@ #include #include -extern "C" { #include "../php_intl.h" #include "dateformat_class.h" #define USE_TIMEZONE_POINTER 1 #include "../timezone/timezone_class.h" #define USE_CALENDAR_POINTER 1 #include "../calendar/calendar_class.h" -} -#include "../intl_convertcpp.h" +#include "../intl_convert.h" #include "dateformat_helpers.h" static inline DateFormat *fetch_datefmt(IntlDateFormatter_object *dfo) { @@ -35,7 +33,7 @@ static inline DateFormat *fetch_datefmt(IntlDateFormatter_object *dfo) { } /* {{{ Get formatter timezone_id. */ -U_CFUNC PHP_FUNCTION(datefmt_get_timezone_id) +PHP_FUNCTION(datefmt_get_timezone_id) { zend_string *u8str; DATE_FORMAT_METHOD_INIT_VARS; @@ -56,7 +54,7 @@ U_CFUNC PHP_FUNCTION(datefmt_get_timezone_id) } /* {{{ Get formatter timezone. */ -U_CFUNC PHP_FUNCTION(datefmt_get_timezone) +PHP_FUNCTION(datefmt_get_timezone) { DATE_FORMAT_METHOD_INIT_VARS; @@ -79,7 +77,7 @@ U_CFUNC PHP_FUNCTION(datefmt_get_timezone) } /* {{{ Set formatter's timezone. */ -U_CFUNC PHP_FUNCTION(datefmt_set_timezone) +PHP_FUNCTION(datefmt_set_timezone) { zend_object *timezone_object = nullptr; zend_string *timezone_string = nullptr; @@ -104,7 +102,7 @@ U_CFUNC PHP_FUNCTION(datefmt_set_timezone) RETURN_TRUE; } -U_CFUNC PHP_METHOD(IntlDateFormatter, setTimeZone) +PHP_METHOD(IntlDateFormatter, setTimeZone) { zend_object *timezone_object = nullptr; zend_string *timezone_string = nullptr; @@ -130,7 +128,7 @@ U_CFUNC PHP_METHOD(IntlDateFormatter, setTimeZone) } /* {{{ Get formatter calendar type. */ -U_CFUNC PHP_FUNCTION(datefmt_get_calendar) +PHP_FUNCTION(datefmt_get_calendar) { DATE_FORMAT_METHOD_INIT_VARS; @@ -151,7 +149,7 @@ U_CFUNC PHP_FUNCTION(datefmt_get_calendar) /* }}} */ /* {{{ Get formatter calendar. */ -U_CFUNC PHP_FUNCTION(datefmt_get_calendar_object) +PHP_FUNCTION(datefmt_get_calendar_object) { DATE_FORMAT_METHOD_INIT_VARS; @@ -179,7 +177,7 @@ U_CFUNC PHP_FUNCTION(datefmt_get_calendar_object) /* }}} */ /* {{{ Set formatter's calendar. */ -U_CFUNC PHP_FUNCTION(datefmt_set_calendar) +PHP_FUNCTION(datefmt_set_calendar) { zend_object *calendar_obj = NULL; zend_long calendar_long = 0; diff --git a/ext/intl/dateformat/dateformat_class.cpp b/ext/intl/dateformat/dateformat_class.cpp index b6ccf97990073..723dc923c7d2d 100644 --- a/ext/intl/dateformat/dateformat_class.cpp +++ b/ext/intl/dateformat/dateformat_class.cpp @@ -13,13 +13,11 @@ */ #include -extern "C" { #include "dateformat_class.h" #include "php_intl.h" #include "dateformat_data.h" #include "dateformat.h" #include "dateformat_arginfo.h" -} #include diff --git a/ext/intl/dateformat/dateformat_class.h b/ext/intl/dateformat/dateformat_class.h index e722c40b4bd9f..18afb55023b42 100644 --- a/ext/intl/dateformat/dateformat_class.h +++ b/ext/intl/dateformat/dateformat_class.h @@ -16,15 +16,9 @@ #include -#ifdef __cplusplus -extern "C" { -#endif #include "intl_common.h" #include "intl_error.h" #include "intl_data.h" -#ifdef __cplusplus -} -#endif #include "dateformat_data.h" typedef struct { @@ -41,14 +35,8 @@ static inline IntlDateFormatter_object *php_intl_dateformatter_fetch_object(zend } #define Z_INTL_DATEFORMATTER_P(zv) php_intl_dateformatter_fetch_object(Z_OBJ_P(zv)) -#ifdef __cplusplus -extern "C" { -#endif void dateformat_register_IntlDateFormatter_class( void ); extern zend_class_entry *IntlDateFormatter_ce_ptr; -#ifdef __cplusplus -} -#endif /* Auxiliary macros */ diff --git a/ext/intl/dateformat/dateformat_create.cpp b/ext/intl/dateformat/dateformat_create.cpp index 251f6f3fbc9b0..d90001f1a141f 100644 --- a/ext/intl/dateformat/dateformat_create.cpp +++ b/ext/intl/dateformat/dateformat_create.cpp @@ -19,7 +19,6 @@ #include #include -extern "C" { #include #include #include @@ -32,7 +31,6 @@ extern "C" { #define USE_TIMEZONE_POINTER 1 #include "../timezone/timezone_class.h" #include "../intl_convert.h" -} #include "dateformat_helpers.h" #include "zend_exceptions.h" @@ -204,7 +202,7 @@ static zend_result datefmt_ctor(INTERNAL_FUNCTION_PARAMETERS) /* }}} */ /* {{{ Create formatter. */ -U_CFUNC PHP_FUNCTION( datefmt_create ) +PHP_FUNCTION( datefmt_create ) { object_init_ex( return_value, IntlDateFormatter_ce_ptr ); if (datefmt_ctor(INTERNAL_FUNCTION_PARAM_PASSTHRU) == FAILURE) { @@ -215,7 +213,7 @@ U_CFUNC PHP_FUNCTION( datefmt_create ) /* }}} */ /* {{{ IntlDateFormatter object constructor. */ -U_CFUNC PHP_METHOD( IntlDateFormatter, __construct ) +PHP_METHOD( IntlDateFormatter, __construct ) { const bool old_use_exception = INTL_G(use_exceptions); const zend_long old_error_level = INTL_G(error_level); diff --git a/ext/intl/dateformat/dateformat_data.h b/ext/intl/dateformat/dateformat_data.h index 962ffbade31d8..4007d1344fbb6 100644 --- a/ext/intl/dateformat/dateformat_data.h +++ b/ext/intl/dateformat/dateformat_data.h @@ -18,13 +18,7 @@ #include -#ifdef __cplusplus -extern "C" { -#endif #include "intl_error.h" -#ifdef __cplusplus -} -#endif typedef struct { // error handling @@ -34,14 +28,8 @@ typedef struct { UDateFormat * udatf; } dateformat_data; -#ifdef __cplusplus -extern "C" { -#endif dateformat_data* dateformat_data_create( void ); void dateformat_data_init( dateformat_data* datef_data ); void dateformat_data_free( dateformat_data* datef_data ); -#ifdef __cplusplus -} -#endif #endif // DATE_FORMAT_DATA_H diff --git a/ext/intl/dateformat/dateformat_format.cpp b/ext/intl/dateformat/dateformat_format.cpp index 30570a5887c17..1fad0de1a40d1 100644 --- a/ext/intl/dateformat/dateformat_format.cpp +++ b/ext/intl/dateformat/dateformat_format.cpp @@ -19,11 +19,8 @@ #include #include -extern "C" { #include "../php_intl.h" #include "../intl_convert.h" -} - #include "../common/common_date.h" #include "dateformat.h" #include "dateformat_class.h" @@ -139,7 +136,7 @@ static UDate internal_get_timestamp(IntlDateFormatter_object *dfo, /* {{{ Format the time value as a string. */ -U_CFUNC PHP_FUNCTION(datefmt_format) +PHP_FUNCTION(datefmt_format) { UDate timestamp = 0; HashTable *hash_arr = NULL; diff --git a/ext/intl/dateformat/dateformat_format_object.cpp b/ext/intl/dateformat/dateformat_format_object.cpp index a5113ce4cf9e1..ca847958b82f8 100644 --- a/ext/intl/dateformat/dateformat_format_object.cpp +++ b/ext/intl/dateformat/dateformat_format_object.cpp @@ -21,16 +21,14 @@ #include #include -#include "../intl_convertcpp.h" +#include "../intl_convert.h" -extern "C" { #include "../php_intl.h" #include "../locale/locale.h" #define USE_CALENDAR_POINTER 1 #include "../calendar/calendar_class.h" #include #include "../common/common_date.h" -} using icu::Locale; using icu::DateFormat; @@ -63,7 +61,7 @@ static bool valid_format(zval *z) { return false; } -U_CFUNC PHP_FUNCTION(datefmt_format_object) +PHP_FUNCTION(datefmt_format_object) { zend_object *object; zval *format = NULL; diff --git a/ext/intl/dateformat/dateformat_helpers.cpp b/ext/intl/dateformat/dateformat_helpers.cpp index 18dc594dedddc..ab0d125ea4cbf 100644 --- a/ext/intl/dateformat/dateformat_helpers.cpp +++ b/ext/intl/dateformat/dateformat_helpers.cpp @@ -19,12 +19,10 @@ #include "dateformat_helpers.h" -extern "C" { #include "../php_intl.h" #include #define USE_CALENDAR_POINTER 1 #include "../calendar/calendar_class.h" -} using icu::GregorianCalendar; diff --git a/ext/intl/dateformat/dateformat_helpers.h b/ext/intl/dateformat/dateformat_helpers.h index b931d9667e5f1..c62f8a24ee0b2 100644 --- a/ext/intl/dateformat/dateformat_helpers.h +++ b/ext/intl/dateformat/dateformat_helpers.h @@ -22,9 +22,7 @@ #include #include -extern "C" { #include "../php_intl.h" -} using icu::Locale; using icu::Calendar; diff --git a/ext/intl/dateformat/dateformat_parse.cpp b/ext/intl/dateformat/dateformat_parse.cpp index a82a20a42f969..2bfd7ceeb4e67 100644 --- a/ext/intl/dateformat/dateformat_parse.cpp +++ b/ext/intl/dateformat/dateformat_parse.cpp @@ -19,10 +19,8 @@ #include #include -extern "C" { #include "php_intl.h" #include "intl_convert.h" -} #include "dateformat.h" #include "dateformat_class.h" #include "dateformat_data.h" @@ -128,7 +126,7 @@ static void internal_parse_to_localtime(IntlDateFormatter_object *dfo, char* tex /* {{{ Parse the string $value starting at parse_pos to a Unix timestamp -int */ -U_CFUNC PHP_FUNCTION(datefmt_parse) +PHP_FUNCTION(datefmt_parse) { char* text_to_parse = NULL; size_t text_len =0; @@ -167,7 +165,7 @@ U_CFUNC PHP_FUNCTION(datefmt_parse) } /* }}} */ -U_CFUNC PHP_METHOD(IntlDateFormatter, parseToCalendar) +PHP_METHOD(IntlDateFormatter, parseToCalendar) { zend_string *text_to_parse = NULL; zval* z_parse_pos = NULL; @@ -210,7 +208,7 @@ U_CFUNC PHP_METHOD(IntlDateFormatter, parseToCalendar) } /* {{{ Parse the string $value to a localtime array */ -U_CFUNC PHP_FUNCTION(datefmt_localtime) +PHP_FUNCTION(datefmt_localtime) { char* text_to_parse = NULL; size_t text_len =0; diff --git a/ext/intl/dateformat/datepatterngenerator_class.cpp b/ext/intl/dateformat/datepatterngenerator_class.cpp index 38faff751fb76..be251ae9e58fe 100644 --- a/ext/intl/dateformat/datepatterngenerator_class.cpp +++ b/ext/intl/dateformat/datepatterngenerator_class.cpp @@ -20,13 +20,11 @@ #include -extern "C" { #define USE_DATETIMEPATTERNGENERATOR_POINTER 1 #include "datepatterngenerator_class.h" #include "datepatterngenerator_arginfo.h" #include #include -} using icu::DateTimePatternGenerator; using icu::Locale; diff --git a/ext/intl/dateformat/datepatterngenerator_methods.cpp b/ext/intl/dateformat/datepatterngenerator_methods.cpp index beaf10d9f5079..7330c11bcad32 100644 --- a/ext/intl/dateformat/datepatterngenerator_methods.cpp +++ b/ext/intl/dateformat/datepatterngenerator_methods.cpp @@ -16,15 +16,13 @@ #include -#include "../intl_convertcpp.h" +#include "../intl_convert.h" -extern "C" { #include "php_intl.h" #define USE_DATETIMEPATTERNGENERATOR_POINTER 1 #include "datepatterngenerator_class.h" #include #include -} using icu::DateTimePatternGenerator; using icu::Locale; @@ -70,7 +68,7 @@ static zend_result dtpg_ctor(INTERNAL_FUNCTION_PARAMETERS) return SUCCESS; } -U_CFUNC PHP_METHOD( IntlDatePatternGenerator, create ) +PHP_METHOD( IntlDatePatternGenerator, create ) { object_init_ex( return_value, IntlDatePatternGenerator_ce_ptr ); if (dtpg_ctor(INTERNAL_FUNCTION_PARAM_PASSTHRU) == FAILURE) { @@ -79,7 +77,7 @@ U_CFUNC PHP_METHOD( IntlDatePatternGenerator, create ) } } -U_CFUNC PHP_METHOD( IntlDatePatternGenerator, __construct ) +PHP_METHOD( IntlDatePatternGenerator, __construct ) { const bool old_use_exception = INTL_G(use_exceptions); const zend_long old_error_level = INTL_G(error_level); @@ -97,7 +95,7 @@ U_CFUNC PHP_METHOD( IntlDatePatternGenerator, __construct ) } -U_CFUNC PHP_METHOD( IntlDatePatternGenerator, getBestPattern ) +PHP_METHOD( IntlDatePatternGenerator, getBestPattern ) { char *skeleton_str = NULL; size_t skeleton_len; diff --git a/ext/intl/formatter/formatter_attr.cpp b/ext/intl/formatter/formatter_attr.cpp index 905a4415ef59b..e0cd6b6cd228d 100644 --- a/ext/intl/formatter/formatter_attr.cpp +++ b/ext/intl/formatter/formatter_attr.cpp @@ -16,16 +16,14 @@ #include #endif -extern "C" { #include "php_intl.h" #include "intl_convert.h" -} #include "formatter_class.h" #include /* {{{ Get formatter attribute value. */ -U_CFUNC PHP_FUNCTION( numfmt_get_attribute ) +PHP_FUNCTION( numfmt_get_attribute ) { zend_long lattribute, value; FORMATTER_METHOD_INIT_VARS; @@ -89,7 +87,7 @@ U_CFUNC PHP_FUNCTION( numfmt_get_attribute ) /* }}} */ /* {{{ Get formatter attribute value. */ -U_CFUNC PHP_FUNCTION( numfmt_get_text_attribute ) +PHP_FUNCTION( numfmt_get_text_attribute ) { zend_long lattribute; UChar value_buf[64]; @@ -128,7 +126,7 @@ U_CFUNC PHP_FUNCTION( numfmt_get_text_attribute ) /* }}} */ /* {{{ Get formatter attribute value. */ -U_CFUNC PHP_FUNCTION( numfmt_set_attribute ) +PHP_FUNCTION( numfmt_set_attribute ) { zend_long lattribute; zval *value; @@ -183,7 +181,7 @@ U_CFUNC PHP_FUNCTION( numfmt_set_attribute ) /* }}} */ /* {{{ Get formatter attribute value. */ -U_CFUNC PHP_FUNCTION( numfmt_set_text_attribute ) +PHP_FUNCTION( numfmt_set_text_attribute ) { int32_t slength = 0; UChar *svalue = NULL; @@ -218,7 +216,7 @@ U_CFUNC PHP_FUNCTION( numfmt_set_text_attribute ) /* }}} */ /* {{{ Get formatter symbol value. */ -U_CFUNC PHP_FUNCTION( numfmt_get_symbol ) +PHP_FUNCTION( numfmt_get_symbol ) { zend_long lsymbol; UChar value_buf[4]; @@ -261,7 +259,7 @@ U_CFUNC PHP_FUNCTION( numfmt_get_symbol ) /* }}} */ /* {{{ Set formatter symbol value. */ -U_CFUNC PHP_FUNCTION( numfmt_set_symbol ) +PHP_FUNCTION( numfmt_set_symbol ) { zend_long lsymbol; char* value = NULL; @@ -303,7 +301,7 @@ U_CFUNC PHP_FUNCTION( numfmt_set_symbol ) /* }}} */ /* {{{ Get formatter pattern. */ -U_CFUNC PHP_FUNCTION( numfmt_get_pattern ) +PHP_FUNCTION( numfmt_get_pattern ) { UChar value_buf[64]; uint32_t length = USIZE( value_buf ); @@ -338,7 +336,7 @@ U_CFUNC PHP_FUNCTION( numfmt_get_pattern ) /* }}} */ /* {{{ Set formatter pattern. */ -U_CFUNC PHP_FUNCTION( numfmt_set_pattern ) +PHP_FUNCTION( numfmt_set_pattern ) { char* value = NULL; size_t value_len = 0; @@ -377,7 +375,7 @@ U_CFUNC PHP_FUNCTION( numfmt_set_pattern ) /* }}} */ /* {{{ Get formatter locale. */ -U_CFUNC PHP_FUNCTION( numfmt_get_locale ) +PHP_FUNCTION( numfmt_get_locale ) { zend_long type = ULOC_ACTUAL_LOCALE; const char* loc; diff --git a/ext/intl/formatter/formatter_class.cpp b/ext/intl/formatter/formatter_class.cpp index 214e1e57dae8a..9ee29b208b960 100644 --- a/ext/intl/formatter/formatter_class.cpp +++ b/ext/intl/formatter/formatter_class.cpp @@ -15,19 +15,14 @@ #include #include "formatter_class.h" -extern "C" { #include "php_intl.h" #include "formatter_data.h" #include "formatter_format.h" -} - #include #include "Zend/zend_attributes.h" #include "Zend/zend_interfaces.h" -extern "C" { #include "formatter_arginfo.h" -} zend_class_entry *NumberFormatter_ce_ptr = NULL; static zend_object_handlers NumberFormatter_handlers; @@ -37,7 +32,7 @@ static zend_object_handlers NumberFormatter_handlers; */ /* {{{ NumberFormatter_objects_free */ -U_CFUNC void NumberFormatter_object_free( zend_object *object ) +void NumberFormatter_object_free( zend_object *object ) { NumberFormatter_object* nfo = php_intl_number_format_fetch_object(object); @@ -48,7 +43,7 @@ U_CFUNC void NumberFormatter_object_free( zend_object *object ) /* }}} */ /* {{{ NumberFormatter_object_create */ -U_CFUNC zend_object *NumberFormatter_object_create(zend_class_entry *ce) +zend_object *NumberFormatter_object_create(zend_class_entry *ce) { NumberFormatter_object* intern; @@ -62,7 +57,7 @@ U_CFUNC zend_object *NumberFormatter_object_create(zend_class_entry *ce) /* }}} */ /* {{{ NumberFormatter_object_clone */ -U_CFUNC zend_object *NumberFormatter_object_clone(zend_object *object) +zend_object *NumberFormatter_object_clone(zend_object *object) { NumberFormatter_object *nfo = php_intl_number_format_fetch_object(object); zend_object *new_obj = NumberFormatter_ce_ptr->create_object(object->ce); @@ -92,7 +87,7 @@ U_CFUNC zend_object *NumberFormatter_object_clone(zend_object *object) /* {{{ formatter_register_class * Initialize 'NumberFormatter' class */ -U_CFUNC void formatter_register_class( void ) +void formatter_register_class( void ) { /* Create and register 'NumberFormatter' class. */ NumberFormatter_ce_ptr = register_class_NumberFormatter(); diff --git a/ext/intl/formatter/formatter_class.h b/ext/intl/formatter/formatter_class.h index bf21825b5f5f4..f7da2b2201917 100644 --- a/ext/intl/formatter/formatter_class.h +++ b/ext/intl/formatter/formatter_class.h @@ -17,16 +17,10 @@ #include -#ifdef __cplusplus -extern "C" { -#endif #include "intl_common.h" #include "intl_error.h" #include "intl_data.h" #include "formatter_data.h" -#ifdef __cplusplus -} -#endif typedef struct { formatter_data nf_data; @@ -38,14 +32,8 @@ static inline NumberFormatter_object *php_intl_number_format_fetch_object(zend_o } #define Z_INTL_NUMBERFORMATTER_P(zv) php_intl_number_format_fetch_object(Z_OBJ_P(zv)) -#ifdef __cplusplus -extern "C" { -#endif void formatter_register_class( void ); extern zend_class_entry *NumberFormatter_ce_ptr; -#ifdef __cplusplus -} -#endif /* Auxiliary macros */ diff --git a/ext/intl/formatter/formatter_data.h b/ext/intl/formatter/formatter_data.h index 35acc242a8db9..817ad0d6055f3 100644 --- a/ext/intl/formatter/formatter_data.h +++ b/ext/intl/formatter/formatter_data.h @@ -19,13 +19,7 @@ #include -#ifdef __cplusplus -extern "C" { -#endif #include "intl_error.h" -#ifdef __cplusplus -} -#endif typedef struct { // error hangling @@ -35,14 +29,8 @@ typedef struct { UNumberFormat* unum; } formatter_data; -#ifdef __cplusplus -extern "C" { -#endif formatter_data* formatter_data_create( void ); void formatter_data_init( formatter_data* nf_data ); void formatter_data_free( formatter_data* nf_data ); -#ifdef __cplusplus -} -#endif #endif // FORMATTER_DATA_H diff --git a/ext/intl/formatter/formatter_format.cpp b/ext/intl/formatter/formatter_format.cpp index f28ea30b9ff8f..65e279715cebe 100644 --- a/ext/intl/formatter/formatter_format.cpp +++ b/ext/intl/formatter/formatter_format.cpp @@ -16,10 +16,8 @@ #include #endif -extern "C" { #include "php_intl.h" #include "intl_convert.h" -} #include @@ -27,7 +25,7 @@ extern "C" { #include "formatter_format.h" /* {{{ Format a number. */ -U_CFUNC PHP_FUNCTION( numfmt_format ) +PHP_FUNCTION( numfmt_format ) { zval *number; zend_long type = FORMAT_TYPE_DEFAULT; @@ -125,7 +123,7 @@ U_CFUNC PHP_FUNCTION( numfmt_format ) /* }}} */ /* {{{ Format a number as currency. */ -U_CFUNC PHP_FUNCTION( numfmt_format_currency ) +PHP_FUNCTION( numfmt_format_currency ) { double number; UChar format_buf[32]; diff --git a/ext/intl/formatter/formatter_main.cpp b/ext/intl/formatter/formatter_main.cpp index a014323089a7e..9b4c320f0eecc 100644 --- a/ext/intl/formatter/formatter_main.cpp +++ b/ext/intl/formatter/formatter_main.cpp @@ -19,10 +19,8 @@ #include #include -extern "C" { #include "php_intl.h" #include "intl_convert.h" -} #include "formatter_class.h" /* {{{ */ @@ -86,7 +84,7 @@ static int numfmt_ctor(INTERNAL_FUNCTION_PARAMETERS) /* }}} */ /* {{{ Create number formatter. */ -U_CFUNC PHP_FUNCTION( numfmt_create ) +PHP_FUNCTION( numfmt_create ) { object_init_ex( return_value, NumberFormatter_ce_ptr ); if (numfmt_ctor(INTERNAL_FUNCTION_PARAM_PASSTHRU) == FAILURE) { @@ -97,7 +95,7 @@ U_CFUNC PHP_FUNCTION( numfmt_create ) /* }}} */ /* {{{ NumberFormatter object constructor. */ -U_CFUNC PHP_METHOD( NumberFormatter, __construct ) +PHP_METHOD( NumberFormatter, __construct ) { const bool old_use_exception = INTL_G(use_exceptions); const zend_long old_error_level = INTL_G(error_level); @@ -114,7 +112,7 @@ U_CFUNC PHP_METHOD( NumberFormatter, __construct ) /* }}} */ /* {{{ Get formatter's last error code. */ -U_CFUNC PHP_FUNCTION( numfmt_get_error_code ) +PHP_FUNCTION( numfmt_get_error_code ) { FORMATTER_METHOD_INIT_VARS @@ -133,7 +131,7 @@ U_CFUNC PHP_FUNCTION( numfmt_get_error_code ) /* }}} */ /* {{{ Get text description for formatter's last error code. */ -U_CFUNC PHP_FUNCTION( numfmt_get_error_message ) +PHP_FUNCTION( numfmt_get_error_message ) { zend_string *message = NULL; FORMATTER_METHOD_INIT_VARS diff --git a/ext/intl/formatter/formatter_parse.cpp b/ext/intl/formatter/formatter_parse.cpp index c7d0df8cbda02..7e42281f3ac5d 100644 --- a/ext/intl/formatter/formatter_parse.cpp +++ b/ext/intl/formatter/formatter_parse.cpp @@ -16,11 +16,8 @@ #include #endif -extern "C" { #include "php_intl.h" #include "intl_convert.h" -} - #include #include @@ -30,7 +27,7 @@ extern "C" { #define ICU_LOCALE_BUG 1 /* {{{ Parse a number. */ -U_CFUNC PHP_FUNCTION( numfmt_parse ) +PHP_FUNCTION( numfmt_parse ) { zend_long type = FORMAT_TYPE_DOUBLE; UChar* sstr = NULL; @@ -122,7 +119,7 @@ U_CFUNC PHP_FUNCTION( numfmt_parse ) /* }}} */ /* {{{ Parse a number as currency. */ -U_CFUNC PHP_FUNCTION( numfmt_parse_currency ) +PHP_FUNCTION( numfmt_parse_currency ) { double number; UChar currency[5] = {0}; diff --git a/ext/intl/grapheme/grapheme.h b/ext/intl/grapheme/grapheme.h index 8ec470d479272..003e0d49317a9 100644 --- a/ext/intl/grapheme/grapheme.h +++ b/ext/intl/grapheme/grapheme.h @@ -18,13 +18,7 @@ #include #include -#ifdef __cplusplus -extern "C" { -#endif void grapheme_close_global_iterator( void ); -#ifdef __cplusplus -} -#endif #define GRAPHEME_EXTRACT_TYPE_COUNT 0 #define GRAPHEME_EXTRACT_TYPE_MAXBYTES 1 diff --git a/ext/intl/grapheme/grapheme_string.cpp b/ext/intl/grapheme/grapheme_string.cpp index 6dd5a002a65b8..899f4f6ee33c8 100644 --- a/ext/intl/grapheme/grapheme_string.cpp +++ b/ext/intl/grapheme/grapheme_string.cpp @@ -22,11 +22,9 @@ #include #endif -extern "C" { #include #include "grapheme.h" #include "grapheme_util.h" -} #include #include @@ -37,7 +35,7 @@ extern "C" { /* }}} */ /* {{{ Get number of graphemes in a string */ -U_CFUNC PHP_FUNCTION(grapheme_strlen) +PHP_FUNCTION(grapheme_strlen) { char* string; size_t string_len; @@ -86,7 +84,7 @@ U_CFUNC PHP_FUNCTION(grapheme_strlen) /* }}} */ /* {{{ Find position of first occurrence of a string within another */ -U_CFUNC PHP_FUNCTION(grapheme_strpos) +PHP_FUNCTION(grapheme_strpos) { char *haystack, *needle, *locale = ""; size_t haystack_len, needle_len, locale_len = 0; @@ -140,7 +138,7 @@ U_CFUNC PHP_FUNCTION(grapheme_strpos) /* }}} */ /* {{{ Find position of first occurrence of a string within another, ignoring case differences */ -U_CFUNC PHP_FUNCTION(grapheme_stripos) +PHP_FUNCTION(grapheme_stripos) { char *haystack, *needle, *locale = ""; size_t haystack_len, needle_len, locale_len = 0; @@ -206,7 +204,7 @@ U_CFUNC PHP_FUNCTION(grapheme_stripos) /* }}} */ /* {{{ Find position of last occurrence of a string within another */ -U_CFUNC PHP_FUNCTION(grapheme_strrpos) +PHP_FUNCTION(grapheme_strrpos) { char *haystack, *needle; char *locale = ""; @@ -266,7 +264,7 @@ U_CFUNC PHP_FUNCTION(grapheme_strrpos) /* }}} */ /* {{{ Find position of last occurrence of a string within another, ignoring case */ -U_CFUNC PHP_FUNCTION(grapheme_strripos) +PHP_FUNCTION(grapheme_strripos) { char *haystack, *needle, *locale = ""; size_t haystack_len, needle_len, locale_len = 0; @@ -334,7 +332,7 @@ U_CFUNC PHP_FUNCTION(grapheme_strripos) /* }}} */ /* {{{ Returns part of a string */ -U_CFUNC PHP_FUNCTION(grapheme_substr) +PHP_FUNCTION(grapheme_substr) { char *str, *locale = ""; zend_string *u8_sub_str; @@ -609,14 +607,14 @@ static void strstr_common_handler(INTERNAL_FUNCTION_PARAMETERS, int f_ignore_cas /* }}} */ /* {{{ Finds first occurrence of a string within another */ -U_CFUNC PHP_FUNCTION(grapheme_strstr) +PHP_FUNCTION(grapheme_strstr) { strstr_common_handler(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0 /* f_ignore_case */); } /* }}} */ /* {{{ Finds first occurrence of a string within another */ -U_CFUNC PHP_FUNCTION(grapheme_stristr) +PHP_FUNCTION(grapheme_stristr) { strstr_common_handler(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1 /* f_ignore_case */); } @@ -719,7 +717,7 @@ static const grapheme_extract_iter grapheme_extract_iters[] = { /* }}} */ /* {{{ Function to extract a sequence of default grapheme clusters */ -U_CFUNC PHP_FUNCTION(grapheme_extract) +PHP_FUNCTION(grapheme_extract) { char *str, *pstr; UText ut = UTEXT_INITIALIZER; @@ -849,7 +847,7 @@ U_CFUNC PHP_FUNCTION(grapheme_extract) RETURN_STRINGL(((char *)pstr), ret_pos); } -U_CFUNC PHP_FUNCTION(grapheme_str_split) +PHP_FUNCTION(grapheme_str_split) { char *pstr, *end; zend_string *str; @@ -927,7 +925,7 @@ U_CFUNC PHP_FUNCTION(grapheme_str_split) ubrk_close(bi); } -U_CFUNC PHP_FUNCTION(grapheme_levenshtein) +PHP_FUNCTION(grapheme_levenshtein) { zend_string *string1, *string2; zend_long cost_ins = 1; diff --git a/ext/intl/grapheme/grapheme_util.cpp b/ext/intl/grapheme/grapheme_util.cpp index a04f3db0b8a6d..c58fa1ff5de63 100644 --- a/ext/intl/grapheme/grapheme_util.cpp +++ b/ext/intl/grapheme/grapheme_util.cpp @@ -22,12 +22,10 @@ #include #endif -extern "C" { #include #include "grapheme.h" #include "grapheme_util.h" #include "intl_common.h" -} #include #include @@ -40,7 +38,7 @@ ZEND_EXTERN_MODULE_GLOBALS( intl ) /* }}} */ /* {{{ grapheme_close_global_iterator - clean up */ -U_CFUNC void +void grapheme_close_global_iterator( void ) { UBreakIterator *global_break_iterator = INTL_G( grapheme_iterator ); @@ -52,7 +50,7 @@ grapheme_close_global_iterator( void ) /* }}} */ /* {{{ grapheme_substr_ascii f='from' - starting point, l='length' */ -U_CFUNC void grapheme_substr_ascii(char *str, size_t str_len, int32_t f, int32_t l, char **sub_str, int32_t *sub_str_len) +void grapheme_substr_ascii(char *str, size_t str_len, int32_t f, int32_t l, char **sub_str, int32_t *sub_str_len) { int32_t str_len2 = (int32_t)str_len; /* in order to avoid signed/unsigned problems */ *sub_str = NULL; @@ -101,7 +99,7 @@ U_CFUNC void grapheme_substr_ascii(char *str, size_t str_len, int32_t f, int32_t /* {{{ grapheme_strpos_utf16 - strrpos using utf16*/ -U_CFUNC int32_t grapheme_strpos_utf16(char *haystack, size_t haystack_len, char *needle, size_t needle_len, int32_t offset, int32_t *puchar_pos, int f_ignore_case, int last, const char* locale) +int32_t grapheme_strpos_utf16(char *haystack, size_t haystack_len, char *needle, size_t needle_len, int32_t offset, int32_t *puchar_pos, int f_ignore_case, int last, const char* locale) { UChar *uhaystack = NULL, *uneedle = NULL; int32_t uhaystack_len = 0, uneedle_len = 0, char_pos, ret_pos, offset_pos = 0; @@ -219,7 +217,7 @@ U_CFUNC int32_t grapheme_strpos_utf16(char *haystack, size_t haystack_len, char /* }}} */ /* {{{ grapheme_ascii_check: ASCII check */ -U_CFUNC zend_long grapheme_ascii_check(const unsigned char *day, size_t len) +zend_long grapheme_ascii_check(const unsigned char *day, size_t len) { int ret_len = len; while ( len-- ) { @@ -233,7 +231,7 @@ U_CFUNC zend_long grapheme_ascii_check(const unsigned char *day, size_t len) /* }}} */ /* {{{ grapheme_split_string: find and optionally return grapheme boundaries */ -U_CFUNC int32_t grapheme_split_string(const UChar *text, int32_t text_length, int boundary_array[], int boundary_array_len ) +int32_t grapheme_split_string(const UChar *text, int32_t text_length, int boundary_array[], int boundary_array_len ) { unsigned char u_break_iterator_buffer[U_BRK_SAFECLONE_BUFFERSIZE]; UErrorCode status = U_ZERO_ERROR; @@ -271,7 +269,7 @@ U_CFUNC int32_t grapheme_split_string(const UChar *text, int32_t text_length, in /* }}} */ /* {{{ grapheme_count_graphemes */ -U_CFUNC int32_t grapheme_count_graphemes(UBreakIterator *bi, UChar *string, int32_t string_len) +int32_t grapheme_count_graphemes(UBreakIterator *bi, UChar *string, int32_t string_len) { int ret_len = 0; int pos = 0; @@ -295,7 +293,7 @@ U_CFUNC int32_t grapheme_count_graphemes(UBreakIterator *bi, UChar *string, int3 /* {{{ grapheme_get_haystack_offset - bump the haystack pointer based on the grapheme count offset */ -U_CFUNC int32_t grapheme_get_haystack_offset(UBreakIterator* bi, int32_t offset) +int32_t grapheme_get_haystack_offset(UBreakIterator* bi, int32_t offset) { int32_t pos; int32_t (*iter_op)(UBreakIterator* bi); @@ -335,7 +333,7 @@ U_CFUNC int32_t grapheme_get_haystack_offset(UBreakIterator* bi, int32_t offset) /* }}} */ /* {{{ grapheme_strrpos_ascii: borrowed from the php ext/standard/string.c */ -U_CFUNC zend_long grapheme_strrpos_ascii(char *haystack, size_t haystack_len, char *needle, size_t needle_len, int32_t offset) +zend_long grapheme_strrpos_ascii(char *haystack, size_t haystack_len, char *needle, size_t needle_len, int32_t offset) { char *p, *e; @@ -375,7 +373,7 @@ U_CFUNC zend_long grapheme_strrpos_ascii(char *haystack, size_t haystack_len, ch /* }}} */ /* {{{ grapheme_get_break_iterator: get a clone of the global character break iterator */ -U_CFUNC UBreakIterator* grapheme_get_break_iterator(void *stack_buffer, UErrorCode *status ) +UBreakIterator* grapheme_get_break_iterator(void *stack_buffer, UErrorCode *status ) { UBreakIterator *global_break_iterator = INTL_G( grapheme_iterator ); diff --git a/ext/intl/grapheme/grapheme_util.h b/ext/intl/grapheme/grapheme_util.h index 57d2ace384f89..9d276a9dcfe26 100644 --- a/ext/intl/grapheme/grapheme_util.h +++ b/ext/intl/grapheme/grapheme_util.h @@ -15,9 +15,6 @@ #ifndef GRAPHEME_GRAPHEME_UTIL_H #define GRAPHEME_GRAPHEME_UTIL_H -#ifdef __cplusplus -extern "C" { -#endif #include "php_intl.h" #include "intl_convert.h" @@ -38,9 +35,6 @@ int32_t grapheme_count_graphemes(UBreakIterator *bi, UChar *string, int32_t stri int32_t grapheme_get_haystack_offset(UBreakIterator* bi, int32_t offset); UBreakIterator* grapheme_get_break_iterator(void *stack_buffer, UErrorCode *status ); -#ifdef __cplusplus -} -#endif /* OUTSIDE_STRING: check if (possibly negative) long offset is outside the string with int32_t length */ #define OUTSIDE_STRING(offset, max_len) ( offset <= INT32_MIN || offset > INT32_MAX || (offset < 0 ? -offset > (zend_long) max_len : offset > (zend_long) max_len) ) diff --git a/ext/intl/idn/idn.cpp b/ext/intl/idn/idn.cpp index 6c7e4d8c6d683..ee19d09719d2b 100644 --- a/ext/intl/idn/idn.cpp +++ b/ext/intl/idn/idn.cpp @@ -20,17 +20,13 @@ #include #endif -extern "C" { #include "../php_intl.h" -} #include #include #include "idn.h" -extern "C" { #include "intl_error.h" -} /* }}} */ enum { @@ -144,7 +140,7 @@ static void php_intl_idn_handoff(INTERNAL_FUNCTION_PARAMETERS, int mode) } /* {{{ Converts an Unicode domain to ASCII representation, as defined in the IDNA RFC */ -U_CFUNC PHP_FUNCTION(idn_to_ascii) +PHP_FUNCTION(idn_to_ascii) { php_intl_idn_handoff(INTERNAL_FUNCTION_PARAM_PASSTHRU, INTL_IDN_TO_ASCII); } @@ -152,7 +148,7 @@ U_CFUNC PHP_FUNCTION(idn_to_ascii) /* {{{ Converts an ASCII representation of the domain to Unicode (UTF-8), as defined in the IDNA RFC */ -U_CFUNC PHP_FUNCTION(idn_to_utf8) +PHP_FUNCTION(idn_to_utf8) { php_intl_idn_handoff(INTERNAL_FUNCTION_PARAM_PASSTHRU, INTL_IDN_TO_UTF8); } diff --git a/ext/intl/intl_convert.c b/ext/intl/intl_convert.cpp similarity index 78% rename from ext/intl/intl_convert.c rename to ext/intl/intl_convert.cpp index 39f70821e117d..0b8d769d026d2 100644 --- a/ext/intl/intl_convert.c +++ b/ext/intl/intl_convert.cpp @@ -19,9 +19,75 @@ #include +#include "intl_cppshims.h" #include "intl_common.h" #include "intl_convert.h" + +/* {{{ intl_stringFromChar */ +int intl_stringFromChar(UnicodeString &ret, char *str, size_t str_len, UErrorCode *status) +{ + if(UNEXPECTED(str_len > INT32_MAX)) { + *status = U_BUFFER_OVERFLOW_ERROR; + ret.setToBogus(); + return FAILURE; + } + //the number of UTF-16 code units is not larger than that of UTF-8 code + //units, + 1 for the terminator + int32_t capacity = (int32_t)str_len + 1; + + //no check necessary -- if NULL will fail ahead + UChar *utf16 = ret.getBuffer(capacity); + int32_t utf16_len = 0; + *status = U_ZERO_ERROR; + u_strFromUTF8WithSub(utf16, ret.getCapacity(), &utf16_len, + str, str_len, U_SENTINEL /* no substitution */, NULL, + status); + ret.releaseBuffer(utf16_len); + if (U_FAILURE(*status)) { + ret.setToBogus(); + return FAILURE; + } + return SUCCESS; +} +/* }}} */ + +/* {{{ intl_charFromString + * faster than doing intl_convert_utf16_to_utf8( + * from.getBuffer(), from.length(), &status), + * but consumes more memory */ +zend_string* intl_charFromString(const UnicodeString &from, UErrorCode *status) +{ + zend_string *u8res; + + if (UNEXPECTED(from.isBogus())) { + return NULL; + } + + //the number of UTF-8 code units is not larger than that of UTF-16 code + //units * 3 + int32_t capacity = from.length() * 3; + + if (from.isEmpty()) { + return ZSTR_EMPTY_ALLOC(); + } + + u8res = zend_string_alloc(capacity, 0); + + const UChar *utf16buf = from.getBuffer(); + int32_t actual_len; + u_strToUTF8WithSub(ZSTR_VAL(u8res), capacity, &actual_len, utf16buf, from.length(), + U_SENTINEL, NULL, status); + + if (U_FAILURE(*status)) { + zend_string_free(u8res); + return NULL; + } + u8res = zend_string_truncate(u8res, actual_len, 0); + + return u8res; +} +/* }}} */ /* {{{ intl_convert_utf8_to_utf16 * Convert given string from UTF-8 to UTF-16 to *target buffer. * diff --git a/ext/intl/intl_convert.h b/ext/intl/intl_convert.h index 5cc3a671333dc..f9cbc7b6a2766 100644 --- a/ext/intl/intl_convert.h +++ b/ext/intl/intl_convert.h @@ -17,6 +17,14 @@ #define INTL_CONVERT_H #include +#include +#include + +using icu::UnicodeString; + +int intl_stringFromChar(UnicodeString &ret, char *str, size_t str_len, UErrorCode *status); + +zend_string* intl_charFromString(const UnicodeString &from, UErrorCode *status); void intl_convert_utf8_to_utf16( UChar** target, int32_t* target_len, diff --git a/ext/intl/intl_convertcpp.cpp b/ext/intl/intl_convertcpp.cpp deleted file mode 100644 index b919c3fb40876..0000000000000 --- a/ext/intl/intl_convertcpp.cpp +++ /dev/null @@ -1,86 +0,0 @@ -/* - +----------------------------------------------------------------------+ - | This source file is subject to version 3.01 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is | - | available through the world-wide-web at the following url: | - | https://www.php.net/license/3_01.txt | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@php.net so we can mail you a copy immediately. | - +----------------------------------------------------------------------+ - | Authors: Gustavo Lopes | - +----------------------------------------------------------------------+ -*/ - -#include "intl_cppshims.h" - -#include "intl_convertcpp.h" -#include -extern "C" { -#include -} - -/* {{{ intl_stringFromChar */ -int intl_stringFromChar(UnicodeString &ret, char *str, size_t str_len, UErrorCode *status) -{ - if(UNEXPECTED(str_len > INT32_MAX)) { - *status = U_BUFFER_OVERFLOW_ERROR; - ret.setToBogus(); - return FAILURE; - } - //the number of UTF-16 code units is not larger than that of UTF-8 code - //units, + 1 for the terminator - int32_t capacity = (int32_t)str_len + 1; - - //no check necessary -- if NULL will fail ahead - UChar *utf16 = ret.getBuffer(capacity); - int32_t utf16_len = 0; - *status = U_ZERO_ERROR; - u_strFromUTF8WithSub(utf16, ret.getCapacity(), &utf16_len, - str, str_len, U_SENTINEL /* no substitution */, NULL, - status); - ret.releaseBuffer(utf16_len); - if (U_FAILURE(*status)) { - ret.setToBogus(); - return FAILURE; - } - return SUCCESS; -} -/* }}} */ - -/* {{{ intl_charFromString - * faster than doing intl_convert_utf16_to_utf8( - * from.getBuffer(), from.length(), &status), - * but consumes more memory */ -zend_string* intl_charFromString(const UnicodeString &from, UErrorCode *status) -{ - zend_string *u8res; - - if (UNEXPECTED(from.isBogus())) { - return NULL; - } - - //the number of UTF-8 code units is not larger than that of UTF-16 code - //units * 3 - int32_t capacity = from.length() * 3; - - if (from.isEmpty()) { - return ZSTR_EMPTY_ALLOC(); - } - - u8res = zend_string_alloc(capacity, 0); - - const UChar *utf16buf = from.getBuffer(); - int32_t actual_len; - u_strToUTF8WithSub(ZSTR_VAL(u8res), capacity, &actual_len, utf16buf, from.length(), - U_SENTINEL, NULL, status); - - if (U_FAILURE(*status)) { - zend_string_free(u8res); - return NULL; - } - u8res = zend_string_truncate(u8res, actual_len, 0); - - return u8res; -} -/* }}} */ diff --git a/ext/intl/intl_convertcpp.h b/ext/intl/intl_convertcpp.h deleted file mode 100644 index 28948c2e01ca6..0000000000000 --- a/ext/intl/intl_convertcpp.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - +----------------------------------------------------------------------+ - | This source file is subject to version 3.01 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is | - | available through the world-wide-web at the following url: | - | https://www.php.net/license/3_01.txt | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@php.net so we can mail you a copy immediately. | - +----------------------------------------------------------------------+ - | Authors: Gustavo Lopes | - +----------------------------------------------------------------------+ -*/ - -#ifndef INTL_CONVERTCPP_H -#define INTL_CONVERTCPP_H - -#ifndef __cplusplus -#error Should be included only in C++ Files -#endif - -#include -#include - -using icu::UnicodeString; - -int intl_stringFromChar(UnicodeString &ret, char *str, size_t str_len, UErrorCode *status); - -zend_string* intl_charFromString(const UnicodeString &from, UErrorCode *status); - -#endif /* INTL_CONVERTCPP_H */ diff --git a/ext/intl/intl_error.c b/ext/intl/intl_error.cpp similarity index 98% rename from ext/intl/intl_error.c rename to ext/intl/intl_error.cpp index be6e53fb5439a..f5d8903cfdbe2 100644 --- a/ext/intl/intl_error.c +++ b/ext/intl/intl_error.cpp @@ -52,7 +52,7 @@ static void intl_free_custom_error_msg( intl_error* err ) /* {{{ Create and initialize internals of 'intl_error'. */ intl_error* intl_error_create( void ) { - intl_error* err = ecalloc( 1, sizeof( intl_error ) ); + intl_error* err = reinterpret_cast(ecalloc( 1, sizeof( intl_error ) )); intl_error_init( err ); diff --git a/ext/intl/listformatter/listformatter_class.cpp b/ext/intl/listformatter/listformatter_class.cpp index 8a7f9ffef9c2b..975dbec0430c8 100644 --- a/ext/intl/listformatter/listformatter_class.cpp +++ b/ext/intl/listformatter/listformatter_class.cpp @@ -12,11 +12,9 @@ +----------------------------------------------------------------------+ */ -extern "C" { #include "php.h" #include "php_intl.h" #include "intl_convert.h" -} #include #include "listformatter_class.h" #include "listformatter_arginfo.h" diff --git a/ext/intl/listformatter/listformatter_class.h b/ext/intl/listformatter/listformatter_class.h index 8edbf8d63e2d0..8fe8137796bfb 100644 --- a/ext/intl/listformatter/listformatter_class.h +++ b/ext/intl/listformatter/listformatter_class.h @@ -46,14 +46,8 @@ static inline ListFormatter_object *php_intl_listformatter_fetch_object(zend_obj #define LISTFORMATTER_OBJECT(lfo) (lfo)->lf_data.ulistfmt -#ifdef __cplusplus -extern "C" { -#endif void listformatter_register_class( void ); extern zend_class_entry *ListFormatter_ce_ptr; -#ifdef __cplusplus -} -#endif #define INTL_LISTFORMATTER_FALLBACK_TYPE_AND 0 #define INTL_LISTFORMATTER_FALLBACK_WIDTH_WIDE 0 diff --git a/ext/intl/locale/locale_class.cpp b/ext/intl/locale/locale_class.cpp index 75fde45d53d60..cbde2a5fb0701 100644 --- a/ext/intl/locale/locale_class.cpp +++ b/ext/intl/locale/locale_class.cpp @@ -13,13 +13,11 @@ */ #include -extern "C" { #include "php_intl.h" #include "intl_error.h" #include "locale_class.h" #include "locale.h" #include "locale_arginfo.h" -} zend_class_entry *Locale_ce_ptr = NULL; @@ -30,7 +28,7 @@ zend_class_entry *Locale_ce_ptr = NULL; /* {{{ locale_register_Locale_class * Initialize 'Locale' class */ -U_CFUNC void locale_register_Locale_class( void ) +void locale_register_Locale_class( void ) { /* Create and register 'Locale' class. */ Locale_ce_ptr = register_class_Locale(); diff --git a/ext/intl/locale/locale_class.h b/ext/intl/locale/locale_class.h index 64a661ca2b44b..aa339d75db9b0 100644 --- a/ext/intl/locale/locale_class.h +++ b/ext/intl/locale/locale_class.h @@ -31,7 +31,7 @@ typedef struct { } Locale_object; -U_CFUNC void locale_register_Locale_class( void ); +void locale_register_Locale_class( void ); extern zend_class_entry *Locale_ce_ptr; diff --git a/ext/intl/locale/locale_methods.cpp b/ext/intl/locale/locale_methods.cpp index 5cf6928a8cd3c..f9d90a003f132 100644 --- a/ext/intl/locale/locale_methods.cpp +++ b/ext/intl/locale/locale_methods.cpp @@ -21,7 +21,6 @@ #include #include -extern "C" { #include "php_intl.h" #include "locale.h" #include "locale_class.h" @@ -33,7 +32,6 @@ extern "C" { #include #include "main/php_ini.h" #include "zend_smart_str.h" -} ZEND_EXTERN_MODULE_GLOBALS( intl ) @@ -298,7 +296,7 @@ static zend_off_t getSingletonPos(const char* str) /* {{{ Get default locale */ /* }}} */ /* {{{ Get default locale */ -U_CFUNC PHP_NAMED_FUNCTION(zif_locale_get_default) +PHP_NAMED_FUNCTION(zif_locale_get_default) { ZEND_PARSE_PARAMETERS_NONE(); @@ -310,7 +308,7 @@ U_CFUNC PHP_NAMED_FUNCTION(zif_locale_get_default) /* {{{ Set default locale */ /* }}} */ /* {{{ Set default locale */ -U_CFUNC PHP_NAMED_FUNCTION(zif_locale_set_default) +PHP_NAMED_FUNCTION(zif_locale_set_default) { zend_string* locale_name; zend_string *ini_name; @@ -520,21 +518,21 @@ static void get_icu_value_src_php( const char* tag_name, INTERNAL_FUNCTION_PARAM /* }}} */ /* {{{ gets the script for the $locale */ -U_CFUNC PHP_FUNCTION( locale_get_script ) +PHP_FUNCTION( locale_get_script ) { get_icu_value_src_php( LOC_SCRIPT_TAG , INTERNAL_FUNCTION_PARAM_PASSTHRU ); } /* }}} */ /* {{{ gets the region for the $locale */ -U_CFUNC PHP_FUNCTION( locale_get_region ) +PHP_FUNCTION( locale_get_region ) { get_icu_value_src_php( LOC_REGION_TAG , INTERNAL_FUNCTION_PARAM_PASSTHRU ); } /* }}} */ /* {{{ gets the primary language for the $locale */ -U_CFUNC PHP_FUNCTION(locale_get_primary_language ) +PHP_FUNCTION(locale_get_primary_language ) { get_icu_value_src_php( LOC_LANG_TAG , INTERNAL_FUNCTION_PARAM_PASSTHRU ); } @@ -672,28 +670,28 @@ static void get_icu_disp_value_src_php( const char* tag_name, INTERNAL_FUNCTION_ /* }}} */ /* {{{ gets the name for the $locale in $in_locale or default_locale */ -U_CFUNC PHP_FUNCTION(locale_get_display_name) +PHP_FUNCTION(locale_get_display_name) { get_icu_disp_value_src_php( DISP_NAME , INTERNAL_FUNCTION_PARAM_PASSTHRU ); } /* }}} */ /* {{{ gets the language for the $locale in $in_locale or default_locale */ -U_CFUNC PHP_FUNCTION(locale_get_display_language) +PHP_FUNCTION(locale_get_display_language) { get_icu_disp_value_src_php( LOC_LANG_TAG , INTERNAL_FUNCTION_PARAM_PASSTHRU ); } /* }}} */ /* {{{ gets the script for the $locale in $in_locale or default_locale */ -U_CFUNC PHP_FUNCTION(locale_get_display_script) +PHP_FUNCTION(locale_get_display_script) { get_icu_disp_value_src_php( LOC_SCRIPT_TAG , INTERNAL_FUNCTION_PARAM_PASSTHRU ); } /* }}} */ /* {{{ gets the region for the $locale in $in_locale or default_locale */ -U_CFUNC PHP_FUNCTION(locale_get_display_region) +PHP_FUNCTION(locale_get_display_region) { get_icu_disp_value_src_php( LOC_REGION_TAG , INTERNAL_FUNCTION_PARAM_PASSTHRU ); } @@ -707,7 +705,7 @@ U_CFUNC PHP_FUNCTION(locale_get_display_region) * proto static string get_display_variant($locale, $in_locale = null) * gets the variant for the $locale in $in_locale or default_locale */ -U_CFUNC PHP_FUNCTION(locale_get_display_variant) +PHP_FUNCTION(locale_get_display_variant) { get_icu_disp_value_src_php( LOC_VARIANT_TAG , INTERNAL_FUNCTION_PARAM_PASSTHRU ); } @@ -719,7 +717,7 @@ U_CFUNC PHP_FUNCTION(locale_get_display_variant) /* {{{ return an associative array containing keyword-value * pairs for this locale. The keys are keys to the array (doh!) */ -U_CFUNC PHP_FUNCTION( locale_get_keywords ) +PHP_FUNCTION( locale_get_keywords ) { UEnumeration* e = NULL; UErrorCode status = U_ZERO_ERROR; @@ -789,7 +787,7 @@ U_CFUNC PHP_FUNCTION( locale_get_keywords ) /* {{{ @return string the canonicalized locale * }}} */ /* {{{ @param string $locale The locale string to canonicalize */ -U_CFUNC PHP_FUNCTION(locale_canonicalize) +PHP_FUNCTION(locale_canonicalize) { get_icu_value_src_php( LOC_CANONICALIZE_TAG , INTERNAL_FUNCTION_PARAM_PASSTHRU ); } @@ -934,7 +932,7 @@ static int handleAppendResult( int result, smart_str* loc_name) * }}} */ /* {{{ Creates a locale by combining the parts of locale-ID passed * }}} */ -U_CFUNC PHP_FUNCTION(locale_compose) +PHP_FUNCTION(locale_compose) { smart_str loc_name_s = {NULL, 0}; smart_str *loc_name = &loc_name_s; @@ -1115,7 +1113,7 @@ static int add_array_entry(const char* loc_name, zval* hash_arr, const char* key /* }}} */ /* {{{ parses a locale-id into an array the different parts of it */ -U_CFUNC PHP_FUNCTION(locale_parse) +PHP_FUNCTION(locale_parse) { char* loc_name = NULL; size_t loc_name_len = 0; @@ -1151,7 +1149,7 @@ U_CFUNC PHP_FUNCTION(locale_parse) /* }}} */ /* {{{ gets an array containing the list of variants, or null */ -U_CFUNC PHP_FUNCTION(locale_get_all_variants) +PHP_FUNCTION(locale_get_all_variants) { char* loc_name = NULL; size_t loc_name_len = 0; @@ -1235,7 +1233,7 @@ static int strToMatch(const char* str ,char *retstr) /* {{{ Checks if a $langtag filter matches with $locale according to RFC 4647's basic filtering algorithm */ /* }}} */ /* {{{ Checks if a $langtag filter matches with $locale according to RFC 4647's basic filtering algorithm */ -U_CFUNC PHP_FUNCTION(locale_filter_matches) +PHP_FUNCTION(locale_filter_matches) { char* lang_tag = NULL; size_t lang_tag_len = 0; @@ -1522,7 +1520,7 @@ static zend_string* lookup_loc_range(const char* loc_range, HashTable* hash_arr, /* {{{ Searches the items in $langtag for the best match to the language * range */ -U_CFUNC PHP_FUNCTION(locale_lookup) +PHP_FUNCTION(locale_lookup) { zend_string* fallback_loc_str = NULL; char* loc_range = NULL; @@ -1575,7 +1573,7 @@ U_CFUNC PHP_FUNCTION(locale_lookup) /* }}} */ /* {{{ Tries to find out best available locale based on HTTP "Accept-Language" header */ -U_CFUNC PHP_FUNCTION(locale_accept_from_http) +PHP_FUNCTION(locale_accept_from_http) { UEnumeration *available; char *http_accept = NULL; @@ -1620,7 +1618,7 @@ U_CFUNC PHP_FUNCTION(locale_accept_from_http) } /* }}} */ -U_CFUNC PHP_FUNCTION(locale_is_right_to_left) +PHP_FUNCTION(locale_is_right_to_left) { char *locale; size_t locale_len; @@ -1636,7 +1634,7 @@ U_CFUNC PHP_FUNCTION(locale_is_right_to_left) RETURN_BOOL(uloc_isRightToLeft(locale)); } -U_CFUNC PHP_FUNCTION(locale_add_likely_subtags) +PHP_FUNCTION(locale_add_likely_subtags) { char *locale, maximized_locale[ULOC_FULLNAME_CAPACITY]; UErrorCode status = U_ZERO_ERROR; @@ -1659,7 +1657,7 @@ U_CFUNC PHP_FUNCTION(locale_add_likely_subtags) RETURN_STRINGL(maximized_locale, maximized_locale_len); } -U_CFUNC PHP_FUNCTION(locale_minimize_subtags) +PHP_FUNCTION(locale_minimize_subtags) { char *locale, minimized_locale[ULOC_FULLNAME_CAPACITY]; UErrorCode status = U_ZERO_ERROR; diff --git a/ext/intl/msgformat/msgformat.cpp b/ext/intl/msgformat/msgformat.cpp index a9e1f71bfc60a..4f0beaf2c0528 100644 --- a/ext/intl/msgformat/msgformat.cpp +++ b/ext/intl/msgformat/msgformat.cpp @@ -19,12 +19,10 @@ #include #include -extern "C" { #include "php_intl.h" #include "msgformat_class.h" #include "msgformat_data.h" #include "intl_convert.h" -} /* {{{ */ static int msgfmt_ctor(INTERNAL_FUNCTION_PARAMETERS) @@ -101,7 +99,7 @@ static int msgfmt_ctor(INTERNAL_FUNCTION_PARAMETERS) /* }}} */ /* {{{ Create formatter. */ -U_CFUNC PHP_FUNCTION( msgfmt_create ) +PHP_FUNCTION( msgfmt_create ) { object_init_ex( return_value, MessageFormatter_ce_ptr ); if (msgfmt_ctor(INTERNAL_FUNCTION_PARAM_PASSTHRU) == FAILURE) { @@ -112,7 +110,7 @@ U_CFUNC PHP_FUNCTION( msgfmt_create ) /* }}} */ /* {{{ MessageFormatter object constructor. */ -U_CFUNC PHP_METHOD( MessageFormatter, __construct ) +PHP_METHOD( MessageFormatter, __construct ) { const bool old_use_exception = INTL_G(use_exceptions); const zend_long old_error_level = INTL_G(error_level); @@ -129,7 +127,7 @@ U_CFUNC PHP_METHOD( MessageFormatter, __construct ) /* }}} */ /* {{{ Get formatter's last error code. */ -U_CFUNC PHP_FUNCTION( msgfmt_get_error_code ) +PHP_FUNCTION( msgfmt_get_error_code ) { zval* object = NULL; MessageFormatter_object* mfo = NULL; @@ -149,7 +147,7 @@ U_CFUNC PHP_FUNCTION( msgfmt_get_error_code ) /* }}} */ /* {{{ Get text description for formatter's last error code. */ -U_CFUNC PHP_FUNCTION( msgfmt_get_error_message ) +PHP_FUNCTION( msgfmt_get_error_message ) { zend_string* message = NULL; zval* object = NULL; diff --git a/ext/intl/msgformat/msgformat_attr.cpp b/ext/intl/msgformat/msgformat_attr.cpp index e7ec006e5e793..6d1813f4608f8 100644 --- a/ext/intl/msgformat/msgformat_attr.cpp +++ b/ext/intl/msgformat/msgformat_attr.cpp @@ -16,17 +16,15 @@ #include #endif -extern "C" { #include "php_intl.h" #include "msgformat_class.h" #include "msgformat_data.h" #include "intl_convert.h" -} #include /* {{{ Get formatter pattern. */ -U_CFUNC PHP_FUNCTION( msgfmt_get_pattern ) +PHP_FUNCTION( msgfmt_get_pattern ) { MSG_FORMAT_METHOD_INIT_VARS; @@ -48,7 +46,7 @@ U_CFUNC PHP_FUNCTION( msgfmt_get_pattern ) /* }}} */ /* {{{ Set formatter pattern. */ -U_CFUNC PHP_FUNCTION( msgfmt_set_pattern ) +PHP_FUNCTION( msgfmt_set_pattern ) { char* value = NULL; size_t value_len = 0; @@ -107,7 +105,7 @@ U_CFUNC PHP_FUNCTION( msgfmt_set_pattern ) /* }}} */ /* {{{ Get formatter locale. */ -U_CFUNC PHP_FUNCTION( msgfmt_get_locale ) +PHP_FUNCTION( msgfmt_get_locale ) { char *loc; MSG_FORMAT_METHOD_INIT_VARS; diff --git a/ext/intl/msgformat/msgformat_class.cpp b/ext/intl/msgformat/msgformat_class.cpp index e762febf0d1b3..ccf59034b67cb 100644 --- a/ext/intl/msgformat/msgformat_class.cpp +++ b/ext/intl/msgformat/msgformat_class.cpp @@ -14,12 +14,10 @@ #include -extern "C" { #include "msgformat_class.h" #include "php_intl.h" #include "msgformat_data.h" #include "msgformat_arginfo.h" -} #include @@ -31,7 +29,7 @@ static zend_object_handlers MessageFormatter_handlers; */ /* {{{ MessageFormatter_objects_free */ -U_CFUNC void MessageFormatter_object_free( zend_object *object ) +void MessageFormatter_object_free( zend_object *object ) { MessageFormatter_object* mfo = php_intl_messageformatter_fetch_object(object); @@ -42,7 +40,7 @@ U_CFUNC void MessageFormatter_object_free( zend_object *object ) /* }}} */ /* {{{ MessageFormatter_object_create */ -U_CFUNC zend_object *MessageFormatter_object_create(zend_class_entry *ce) +zend_object *MessageFormatter_object_create(zend_class_entry *ce) { MessageFormatter_object* intern; @@ -56,7 +54,7 @@ U_CFUNC zend_object *MessageFormatter_object_create(zend_class_entry *ce) /* }}} */ /* {{{ MessageFormatter_object_clone */ -U_CFUNC zend_object *MessageFormatter_object_clone(zend_object *object) +zend_object *MessageFormatter_object_clone(zend_object *object) { MessageFormatter_object *mfo = php_intl_messageformatter_fetch_object(object); zend_object *new_obj = MessageFormatter_ce_ptr->create_object(object->ce); diff --git a/ext/intl/msgformat/msgformat_data.cpp b/ext/intl/msgformat/msgformat_data.cpp index f8b7ec39601eb..9c8631a037e60 100644 --- a/ext/intl/msgformat/msgformat_data.cpp +++ b/ext/intl/msgformat/msgformat_data.cpp @@ -24,7 +24,7 @@ /* {{{ void msgformat_data_init( msgformat_data* mf_data ) * Initialize internals of msgformat_data. */ -U_CFUNC void msgformat_data_init( msgformat_data* mf_data ) +void msgformat_data_init( msgformat_data* mf_data ) { if( !mf_data ) return; @@ -40,7 +40,7 @@ U_CFUNC void msgformat_data_init( msgformat_data* mf_data ) /* {{{ void msgformat_data_free( msgformat_data* mf_data ) * Clean up memory allocated for msgformat_data */ -U_CFUNC void msgformat_data_free(msgformat_data* mf_data) +void msgformat_data_free(msgformat_data* mf_data) { if (!mf_data) return; diff --git a/ext/intl/msgformat/msgformat_data.h b/ext/intl/msgformat/msgformat_data.h index bac94cbec34c3..cd81d6338430c 100644 --- a/ext/intl/msgformat/msgformat_data.h +++ b/ext/intl/msgformat/msgformat_data.h @@ -17,13 +17,7 @@ #include -#ifdef __cplusplus -extern "C" { -#endif #include "../intl_error.h" -#ifdef __cplusplus -} -#endif #include @@ -39,15 +33,9 @@ typedef struct { int tz_set; /* if we've already the time zone in sub-formats */ } msgformat_data; -#ifdef __cplusplus -extern "C" { -#endif msgformat_data* msgformat_data_create( void ); void msgformat_data_init( msgformat_data* mf_data ); void msgformat_data_free( msgformat_data* mf_data ); -#ifdef __cplusplus -} -#endif #ifdef MSG_FORMAT_QUOTE_APOS int msgformat_fix_quotes(UChar **spattern, uint32_t *spattern_len, UErrorCode *ec); diff --git a/ext/intl/msgformat/msgformat_format.cpp b/ext/intl/msgformat/msgformat_format.cpp index 8e3ec28b389e1..54babc9839648 100644 --- a/ext/intl/msgformat/msgformat_format.cpp +++ b/ext/intl/msgformat/msgformat_format.cpp @@ -18,13 +18,11 @@ #include -extern "C" { #include "php_intl.h" #include "msgformat_class.h" #include "msgformat_data.h" #include "msgformat_helpers.h" #include "intl_convert.h" -} #ifndef Z_ADDREF_P #define Z_ADDREF_P(z) ((z)->refcount++) @@ -50,7 +48,7 @@ static void msgfmt_do_format(MessageFormatter_object *mfo, zval *args, zval *ret /* }}} */ /* {{{ Format a message. */ -U_CFUNC PHP_FUNCTION( msgfmt_format ) +PHP_FUNCTION( msgfmt_format ) { zval *args; MSG_FORMAT_METHOD_INIT_VARS; @@ -71,7 +69,7 @@ U_CFUNC PHP_FUNCTION( msgfmt_format ) /* }}} */ /* {{{ Format a message. */ -U_CFUNC PHP_FUNCTION( msgfmt_format_message ) +PHP_FUNCTION( msgfmt_format_message ) { zval *args; UChar *spattern = NULL; diff --git a/ext/intl/msgformat/msgformat_helpers.cpp b/ext/intl/msgformat/msgformat_helpers.cpp index e734b2df27b84..799f996da99ac 100644 --- a/ext/intl/msgformat/msgformat_helpers.cpp +++ b/ext/intl/msgformat/msgformat_helpers.cpp @@ -29,17 +29,14 @@ #include -#include "../intl_convertcpp.h" +#include "../intl_convert.h" #include "../common/common_date.h" -extern "C" { #include "php_intl.h" #include "msgformat_class.h" #include "msgformat_helpers.h" -#include "intl_convert.h" #define USE_TIMEZONE_POINTER #include "../timezone/timezone_class.h" -} U_NAMESPACE_BEGIN /** @@ -75,7 +72,7 @@ using icu::MessagePattern; using icu::MessageFormatAdapter; using icu::FieldPosition; -U_CFUNC int32_t umsg_format_arg_count(UMessageFormat *fmt) +int32_t umsg_format_arg_count(UMessageFormat *fmt) { int32_t fmt_count = 0; MessageFormatAdapter::phpGetArgTypeList(*(const MessageFormat*)fmt, fmt_count); @@ -359,7 +356,7 @@ static void umsg_set_timezone(MessageFormatter_object *mfo, } } -U_CFUNC void umsg_format_helper(MessageFormatter_object *mfo, +void umsg_format_helper(MessageFormatter_object *mfo, HashTable *args, UChar **formatted, int32_t *formatted_len) @@ -614,7 +611,7 @@ U_CFUNC void umsg_format_helper(MessageFormatter_object *mfo, #define cleanup_zvals() for(int j=i;j>=0;j--) { zval_ptr_dtor((*args)+i); } -U_CFUNC void umsg_parse_helper(UMessageFormat *fmt, int *count, zval **args, UChar *source, int32_t source_len, UErrorCode *status) +void umsg_parse_helper(UMessageFormat *fmt, int *count, zval **args, UChar *source, int32_t source_len, UErrorCode *status) { UnicodeString srcString(source, source_len); Formattable *fargs = ((const MessageFormat*)fmt)->parse(srcString, *count, *status); diff --git a/ext/intl/msgformat/msgformat_parse.cpp b/ext/intl/msgformat/msgformat_parse.cpp index 28d7ce7108021..5c4f0443981f4 100644 --- a/ext/intl/msgformat/msgformat_parse.cpp +++ b/ext/intl/msgformat/msgformat_parse.cpp @@ -18,13 +18,11 @@ #include -extern "C" { #include "php_intl.h" #include "msgformat_class.h" #include "msgformat_data.h" #include "msgformat_helpers.h" #include "intl_convert.h" -} /* {{{ */ static void msgfmt_do_parse(MessageFormatter_object *mfo, char *source, size_t src_len, zval *return_value) @@ -54,7 +52,7 @@ static void msgfmt_do_parse(MessageFormatter_object *mfo, char *source, size_t s /* }}} */ /* {{{ Parse a message */ -U_CFUNC PHP_FUNCTION( msgfmt_parse ) +PHP_FUNCTION( msgfmt_parse ) { char *source; size_t source_len; @@ -76,7 +74,7 @@ U_CFUNC PHP_FUNCTION( msgfmt_parse ) /* }}} */ /* {{{ Parse a message. */ -U_CFUNC PHP_FUNCTION( msgfmt_parse_message ) +PHP_FUNCTION( msgfmt_parse_message ) { UChar *spattern = NULL; int spattern_len = 0; diff --git a/ext/intl/normalizer/normalizer_class.cpp b/ext/intl/normalizer/normalizer_class.cpp index 3838f7546325a..625003ef9a4b0 100644 --- a/ext/intl/normalizer/normalizer_class.cpp +++ b/ext/intl/normalizer/normalizer_class.cpp @@ -20,14 +20,8 @@ #include "normalizer.h" #include "normalizer_class.h" #include "php_intl.h" -#ifdef __cplusplus -extern "C" { -#endif #include "normalizer_arginfo.h" #include "intl_error.h" -#ifdef __cplusplus -} -#endif #include @@ -40,7 +34,7 @@ zend_class_entry *Normalizer_ce_ptr = NULL; /* {{{ normalizer_register_Normalizer_class * Initialize 'Normalizer' class */ -U_CFUNC void normalizer_register_Normalizer_class( void ) +void normalizer_register_Normalizer_class( void ) { /* Create and register 'Normalizer' class. */ Normalizer_ce_ptr = register_class_Normalizer(); diff --git a/ext/intl/normalizer/normalizer_class.h b/ext/intl/normalizer/normalizer_class.h index 8f88f215abcca..6e57cae40ba0e 100644 --- a/ext/intl/normalizer/normalizer_class.h +++ b/ext/intl/normalizer/normalizer_class.h @@ -36,12 +36,6 @@ typedef struct { #define NORMALIZER_ERROR_CODE(co) INTL_ERROR_CODE(NORMALIZER_ERROR(co)) #define NORMALIZER_ERROR_CODE_P(co) &(INTL_ERROR_CODE(NORMALIZER_ERROR(co))) -#ifdef __cplusplus -extern "C" { -#endif void normalizer_register_Normalizer_class( void ); -#ifdef __cplusplus -} -#endif extern zend_class_entry *Normalizer_ce_ptr; #endif // #ifndef NORMALIZER_CLASS_H diff --git a/ext/intl/normalizer/normalizer_normalize.cpp b/ext/intl/normalizer/normalizer_normalize.cpp index 92e8f1166ad00..34ddbdcde3bed 100644 --- a/ext/intl/normalizer/normalizer_normalize.cpp +++ b/ext/intl/normalizer/normalizer_normalize.cpp @@ -21,13 +21,11 @@ #include #endif -extern "C" { #include "php_intl.h" #include #include "normalizer.h" #include "normalizer_class.h" #include "intl_convert.h" -} #include @@ -78,7 +76,7 @@ static UBool intl_is_normalized(zend_long form, const UChar *uinput, int32_t uin }/*}}}*/ /* {{{ Normalize a string. */ -U_CFUNC PHP_FUNCTION( normalizer_normalize ) +PHP_FUNCTION( normalizer_normalize ) { char* input = NULL; /* form is optional, defaults to FORM_C */ @@ -207,7 +205,7 @@ U_CFUNC PHP_FUNCTION( normalizer_normalize ) /* }}} */ /* {{{ Test if a string is in a given normalization form. */ -U_CFUNC PHP_FUNCTION( normalizer_is_normalized ) +PHP_FUNCTION( normalizer_is_normalized ) { char* input = NULL; /* form is optional, defaults to FORM_C */ @@ -283,7 +281,7 @@ U_CFUNC PHP_FUNCTION( normalizer_is_normalized ) /* }}} */ /* {{{ Returns the Decomposition_Mapping property for the given UTF-8 encoded code point. */ -U_CFUNC PHP_FUNCTION( normalizer_get_raw_decomposition ) +PHP_FUNCTION( normalizer_get_raw_decomposition ) { char* input = NULL; size_t input_length = 0; diff --git a/ext/intl/php_intl.c b/ext/intl/php_intl.cpp similarity index 99% rename from ext/intl/php_intl.c rename to ext/intl/php_intl.cpp index 00001e9985b7f..42e9dab6ae78d 100644 --- a/ext/intl/php_intl.c +++ b/ext/intl/php_intl.cpp @@ -73,7 +73,6 @@ #include #include -#include "php_ini.h" #include "zend_attributes.h" diff --git a/ext/intl/php_intl.h b/ext/intl/php_intl.h index a56c34f3dce44..554957997adb8 100644 --- a/ext/intl/php_intl.h +++ b/ext/intl/php_intl.h @@ -20,11 +20,6 @@ #include -/* Even if we're included from C++, don't introduce C++ definitions - * because we were included with extern "C". The effect would be that - * when the headers defined any method, they would do so with C linkage */ -#undef U_SHOW_CPLUSPLUS_API -#define U_SHOW_CPLUSPLUS_API 0 #include "collator/collator_sort.h" #include #include "intl_error.h" diff --git a/ext/intl/php_intl_arginfo.h b/ext/intl/php_intl_arginfo.h index f778e4cacf3d4..b03a0d2af874e 100644 --- a/ext/intl/php_intl_arginfo.h +++ b/ext/intl/php_intl_arginfo.h @@ -1226,14 +1226,14 @@ static void register_php_intl_symbols(int module_number) REGISTER_LONG_CONSTANT("IDNA_ERROR_CONTEXTJ", UIDNA_ERROR_CONTEXTJ, CONST_PERSISTENT); - zend_attribute *attribute_Deprecated_func_intlcal_set_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "intlcal_set", sizeof("intlcal_set") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_intlcal_set_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "intlcal_set", sizeof("intlcal_set") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_intlcal_set_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_4)); attribute_Deprecated_func_intlcal_set_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_intlcal_set_0_arg1_str = zend_string_init("use IntlCalendar::set(), IntlCalendar::setDate(), or IntlCalendar::setDateTime() instead", strlen("use IntlCalendar::set(), IntlCalendar::setDate(), or IntlCalendar::setDateTime() instead"), 1); ZVAL_STR(&attribute_Deprecated_func_intlcal_set_0->args[1].value, attribute_Deprecated_func_intlcal_set_0_arg1_str); attribute_Deprecated_func_intlcal_set_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_attribute *attribute_Deprecated_func_intlgregcal_create_instance_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "intlgregcal_create_instance", sizeof("intlgregcal_create_instance") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_intlgregcal_create_instance_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "intlgregcal_create_instance", sizeof("intlgregcal_create_instance") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_intlgregcal_create_instance_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_4)); attribute_Deprecated_func_intlgregcal_create_instance_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_intlgregcal_create_instance_0_arg1_str = zend_string_init("use IntlGregorianCalendar::__construct(), IntlGregorianCalendar::createFromDate(), or IntlGregorianCalendar::createFromDateTime() instead", strlen("use IntlGregorianCalendar::__construct(), IntlGregorianCalendar::createFromDate(), or IntlGregorianCalendar::createFromDateTime() instead"), 1); diff --git a/ext/intl/rangeformatter/rangeformatter_class.cpp b/ext/intl/rangeformatter/rangeformatter_class.cpp index 2042966177cb2..0496f6a69d16b 100644 --- a/ext/intl/rangeformatter/rangeformatter_class.cpp +++ b/ext/intl/rangeformatter/rangeformatter_class.cpp @@ -12,26 +12,21 @@ +----------------------------------------------------------------------+ */ -extern "C" { - #include "php.h" - #include "zend_API.h" - #include "../intl_common.h" -} +#include "php.h" +#include "zend_API.h" +#include "../intl_common.h" #if U_ICU_VERSION_MAJOR_NUM >= 63 #include #include #include -#include "../intl_convertcpp.h" - -extern "C" { - #include "../intl_error.h" - #include "../php_intl.h" - #include "../intl_data.h" - #include "rangeformatter_arginfo.h" - #include "rangeformatter_class.h" - #include "intl_convert.h" -} +#include "../intl_convert.h" + +#include "../intl_error.h" +#include "../php_intl.h" +#include "../intl_data.h" +#include "rangeformatter_arginfo.h" +#include "rangeformatter_class.h" using icu::number::NumberRangeFormatter; using icu::number::NumberFormatter; @@ -60,13 +55,13 @@ zend_object *IntlNumberRangeFormatter_object_create(zend_class_entry *ce) return &intern->zo; } -U_CFUNC PHP_METHOD(IntlNumberRangeFormatter, __construct) +PHP_METHOD(IntlNumberRangeFormatter, __construct) { ZEND_PARSE_PARAMETERS_NONE(); zend_throw_error(NULL, "Cannot directly construct %s, use createFromSkeleton method instead", ZSTR_VAL(Z_OBJCE_P(ZEND_THIS)->name)); } -U_CFUNC PHP_METHOD(IntlNumberRangeFormatter, createFromSkeleton) +PHP_METHOD(IntlNumberRangeFormatter, createFromSkeleton) { char* skeleton; char* locale; @@ -140,7 +135,7 @@ U_CFUNC PHP_METHOD(IntlNumberRangeFormatter, createFromSkeleton) RETURN_OBJ(obj); } -U_CFUNC PHP_METHOD(IntlNumberRangeFormatter, format) +PHP_METHOD(IntlNumberRangeFormatter, format) { zval *start; zval *end; @@ -181,7 +176,7 @@ U_CFUNC PHP_METHOD(IntlNumberRangeFormatter, format) RETVAL_NEW_STR(ret); } -U_CFUNC PHP_METHOD(IntlNumberRangeFormatter, getErrorCode) +PHP_METHOD(IntlNumberRangeFormatter, getErrorCode) { ZEND_PARSE_PARAMETERS_NONE(); @@ -190,7 +185,7 @@ U_CFUNC PHP_METHOD(IntlNumberRangeFormatter, getErrorCode) RETURN_LONG(intl_error_get_code(&obj->nrf_data.error)); } -U_CFUNC PHP_METHOD(IntlNumberRangeFormatter, getErrorMessage) +PHP_METHOD(IntlNumberRangeFormatter, getErrorMessage) { ZEND_PARSE_PARAMETERS_NONE(); diff --git a/ext/intl/resourcebundle/resourcebundle.cpp b/ext/intl/resourcebundle/resourcebundle.cpp index b8c5c00efaba6..e29596f01872e 100644 --- a/ext/intl/resourcebundle/resourcebundle.cpp +++ b/ext/intl/resourcebundle/resourcebundle.cpp @@ -17,14 +17,12 @@ #include #include -extern "C" { #include "intl_convert.h" #include "intl_data.h" #include "resourcebundle/resourcebundle_class.h" -} /* {{{ ResourceBundle_extract_value */ -U_CFUNC void resourcebundle_extract_value( zval *return_value, ResourceBundle_object *source ) +void resourcebundle_extract_value( zval *return_value, ResourceBundle_object *source ) { UResType restype; const UChar* ufield; diff --git a/ext/intl/resourcebundle/resourcebundle.h b/ext/intl/resourcebundle/resourcebundle.h index c46908a8edff2..ddcf75b8c50ac 100644 --- a/ext/intl/resourcebundle/resourcebundle.h +++ b/ext/intl/resourcebundle/resourcebundle.h @@ -21,12 +21,6 @@ #include "resourcebundle/resourcebundle_class.h" -#ifdef __cplusplus -extern "C" { -#endif void resourcebundle_extract_value( zval *target, ResourceBundle_object *source); -#ifdef __cplusplus -} -#endif #endif // #ifndef RESOURCEBUNDLE_CLASS_H diff --git a/ext/intl/resourcebundle/resourcebundle_class.cpp b/ext/intl/resourcebundle/resourcebundle_class.cpp index d88ba2ad13170..bc88ad8151849 100644 --- a/ext/intl/resourcebundle/resourcebundle_class.cpp +++ b/ext/intl/resourcebundle/resourcebundle_class.cpp @@ -17,15 +17,12 @@ #include -extern "C" { #include #include -} #include #include -extern "C" { #include "php_intl.h" #include "intl_data.h" #include "intl_common.h" @@ -33,7 +30,6 @@ extern "C" { #include "resourcebundle/resourcebundle_iterator.h" #include "resourcebundle/resourcebundle_class.h" #include "resourcebundle/resourcebundle_arginfo.h" -} zend_class_entry *ResourceBundle_ce_ptr = NULL; @@ -157,7 +153,7 @@ PHP_METHOD( ResourceBundle, __construct ) /* }}} */ /* {{{ */ -U_CFUNC PHP_FUNCTION( resourcebundle_create ) +PHP_FUNCTION( resourcebundle_create ) { object_init_ex( return_value, ResourceBundle_ce_ptr ); if (resourcebundle_ctor(INTERNAL_FUNCTION_PARAM_PASSTHRU) == FAILURE) { @@ -239,7 +235,7 @@ static zval *resource_bundle_array_fetch( /* }}} */ /* {{{ resourcebundle_array_get */ -U_CFUNC zval *resourcebundle_array_get(zend_object *object, zval *offset, int type, zval *rv) +zval *resourcebundle_array_get(zend_object *object, zval *offset, int type, zval *rv) { if (offset == NULL) { zend_throw_error(NULL, "Cannot apply [] to ResourceBundle object"); @@ -259,7 +255,7 @@ U_CFUNC zval *resourcebundle_array_get(zend_object *object, zval *offset, int ty /* }}} */ /* {{{ Get resource identified by numerical index or key name. */ -U_CFUNC PHP_FUNCTION( resourcebundle_get ) +PHP_FUNCTION( resourcebundle_get ) { bool fallback = true; zend_object *resource_bundle = NULL; @@ -317,7 +313,7 @@ static zend_result resourcebundle_array_count(zend_object *object, zend_long *co /* }}} */ /* {{{ Get resources count */ -U_CFUNC PHP_FUNCTION( resourcebundle_count ) +PHP_FUNCTION( resourcebundle_count ) { int32_t len; RESOURCEBUNDLE_METHOD_INIT_VARS; @@ -333,7 +329,7 @@ U_CFUNC PHP_FUNCTION( resourcebundle_count ) } /* {{{ Get available locales from ResourceBundle name */ -U_CFUNC PHP_FUNCTION( resourcebundle_locales ) +PHP_FUNCTION( resourcebundle_locales ) { char * bundlename; size_t bundlename_len = 0; @@ -373,7 +369,7 @@ U_CFUNC PHP_FUNCTION( resourcebundle_locales ) /* }}} */ /* {{{ Get text description for ResourceBundle's last error code. */ -U_CFUNC PHP_FUNCTION( resourcebundle_get_error_code ) +PHP_FUNCTION( resourcebundle_get_error_code ) { RESOURCEBUNDLE_METHOD_INIT_VARS; @@ -390,7 +386,7 @@ U_CFUNC PHP_FUNCTION( resourcebundle_get_error_code ) /* }}} */ /* {{{ Get text description for ResourceBundle's last error. */ -U_CFUNC PHP_FUNCTION( resourcebundle_get_error_message ) +PHP_FUNCTION( resourcebundle_get_error_message ) { zend_string* message = NULL; RESOURCEBUNDLE_METHOD_INIT_VARS; @@ -416,7 +412,7 @@ PHP_METHOD(ResourceBundle, getIterator) { /* {{{ resourcebundle_register_class * Initialize 'ResourceBundle' class */ -U_CFUNC void resourcebundle_register_class( void ) +void resourcebundle_register_class( void ) { ResourceBundle_ce_ptr = register_class_ResourceBundle(zend_ce_aggregate, zend_ce_countable); ResourceBundle_ce_ptr->create_object = ResourceBundle_object_create; diff --git a/ext/intl/resourcebundle/resourcebundle_class.h b/ext/intl/resourcebundle/resourcebundle_class.h index 334532bde99b7..4edf3a07596db 100644 --- a/ext/intl/resourcebundle/resourcebundle_class.h +++ b/ext/intl/resourcebundle/resourcebundle_class.h @@ -18,14 +18,8 @@ #include #include -#ifdef __cplusplus -extern "C" { -#endif #include "php.h" #include "intl_error.h" -#ifdef __cplusplus -} -#endif typedef struct { intl_error error; @@ -51,13 +45,7 @@ static inline ResourceBundle_object *php_intl_resourcebundle_fetch_object(zend_o #define RESOURCEBUNDLE_OBJECT(rb) (rb)->me -#ifdef __cplusplus -extern "C" { -#endif void resourcebundle_register_class( void ); extern zend_class_entry *ResourceBundle_ce_ptr; -#ifdef __cplusplus -} -#endif #endif // #ifndef RESOURCEBUNDLE_CLASS_H diff --git a/ext/intl/resourcebundle/resourcebundle_iterator.cpp b/ext/intl/resourcebundle/resourcebundle_iterator.cpp index 7747b34adbd4c..37fd9ae10bfe0 100644 --- a/ext/intl/resourcebundle/resourcebundle_iterator.cpp +++ b/ext/intl/resourcebundle/resourcebundle_iterator.cpp @@ -12,11 +12,9 @@ +----------------------------------------------------------------------+ */ -extern "C" { #include #include #include -} #include "resourcebundle/resourcebundle.h" #include "resourcebundle/resourcebundle_class.h" @@ -147,7 +145,7 @@ static const zend_object_iterator_funcs resourcebundle_iterator_funcs = { /* }}} */ /* {{{ resourcebundle_get_iterator */ -U_CFUNC zend_object_iterator *resourcebundle_get_iterator( zend_class_entry *ce, zval *object, int byref ) +zend_object_iterator *resourcebundle_get_iterator( zend_class_entry *ce, zval *object, int byref ) { if (byref) { zend_throw_error(NULL, "An iterator cannot be used with foreach by reference"); diff --git a/ext/intl/resourcebundle/resourcebundle_iterator.h b/ext/intl/resourcebundle/resourcebundle_iterator.h index c323d4e17b4c9..1ad948723160f 100644 --- a/ext/intl/resourcebundle/resourcebundle_iterator.h +++ b/ext/intl/resourcebundle/resourcebundle_iterator.h @@ -29,12 +29,6 @@ typedef struct { zend_long i; } ResourceBundle_iterator; -#ifdef __cplusplus -extern "C" { -#endif zend_object_iterator *resourcebundle_get_iterator( zend_class_entry *ce, zval *object, int byref ); -#ifdef __cplusplus -} -#endif #endif // #ifndef RESOURCEBUNDLE_ITERATOR_H diff --git a/ext/intl/spoofchecker/spoofchecker_class.cpp b/ext/intl/spoofchecker/spoofchecker_class.cpp index ba4c64321f14e..eb78864af83b9 100644 --- a/ext/intl/spoofchecker/spoofchecker_class.cpp +++ b/ext/intl/spoofchecker/spoofchecker_class.cpp @@ -13,11 +13,9 @@ */ #include "spoofchecker_class.h" -extern "C" { #include "spoofchecker_arginfo.h" #include "php_intl.h" #include "intl_error.h" -} #include @@ -29,7 +27,7 @@ static zend_object_handlers Spoofchecker_handlers; */ /* {{{ Spoofchecker_objects_free */ -U_CFUNC void Spoofchecker_objects_free(zend_object *object) +void Spoofchecker_objects_free(zend_object *object) { Spoofchecker_object* co = php_intl_spoofchecker_fetch_object(object); @@ -40,7 +38,7 @@ U_CFUNC void Spoofchecker_objects_free(zend_object *object) /* }}} */ /* {{{ Spoofchecker_object_create */ -U_CFUNC zend_object *Spoofchecker_object_create(zend_class_entry *ce) +zend_object *Spoofchecker_object_create(zend_class_entry *ce) { Spoofchecker_object* intern; @@ -89,7 +87,7 @@ static zend_object *spoofchecker_clone_obj(zend_object *object) /* {{{ */ /* {{{ spoofchecker_register_Spoofchecker_class * Initialize 'Spoofchecker' class */ -U_CFUNC void spoofchecker_register_Spoofchecker_class(void) +void spoofchecker_register_Spoofchecker_class(void) { /* Create and register 'Spoofchecker' class. */ Spoofchecker_ce_ptr = register_class_Spoofchecker(); @@ -108,7 +106,7 @@ U_CFUNC void spoofchecker_register_Spoofchecker_class(void) * Initialize internals of Spoofchecker_object. * Must be called before any other call to 'spoofchecker_object_...' functions. */ -U_CFUNC void spoofchecker_object_init(Spoofchecker_object* co) +void spoofchecker_object_init(Spoofchecker_object* co) { if (!co) { return; @@ -121,7 +119,7 @@ U_CFUNC void spoofchecker_object_init(Spoofchecker_object* co) /* {{{ void spoofchecker_object_destroy( Spoofchecker_object* co ) * Clean up mem allocted by internals of Spoofchecker_object */ -U_CFUNC void spoofchecker_object_destroy(Spoofchecker_object* co) +void spoofchecker_object_destroy(Spoofchecker_object* co) { if (!co) { return; diff --git a/ext/intl/spoofchecker/spoofchecker_class.h b/ext/intl/spoofchecker/spoofchecker_class.h index 06701eb60e36e..a471c055c2ce6 100644 --- a/ext/intl/spoofchecker/spoofchecker_class.h +++ b/ext/intl/spoofchecker/spoofchecker_class.h @@ -17,15 +17,9 @@ #include -#ifdef __cplusplus -extern "C" { -#endif #include "intl_common.h" #include "intl_error.h" #include "intl_data.h" -#ifdef __cplusplus -} -#endif #include @@ -53,16 +47,10 @@ static inline Spoofchecker_object *php_intl_spoofchecker_fetch_object(zend_objec #define SPOOFCHECKER_ERROR_CODE(co) INTL_ERROR_CODE(SPOOFCHECKER_ERROR(co)) #define SPOOFCHECKER_ERROR_CODE_P(co) &(INTL_ERROR_CODE(SPOOFCHECKER_ERROR(co))) -#ifdef __cplusplus -extern "C" { -#endif void spoofchecker_register_Spoofchecker_class(void); void spoofchecker_object_init(Spoofchecker_object* co); void spoofchecker_object_destroy(Spoofchecker_object* co); -#ifdef __cplusplus -} -#endif extern zend_class_entry *Spoofchecker_ce_ptr; diff --git a/ext/intl/spoofchecker/spoofchecker_create.cpp b/ext/intl/spoofchecker/spoofchecker_create.cpp index 1ed4055cccd10..69069ec487d51 100644 --- a/ext/intl/spoofchecker/spoofchecker_create.cpp +++ b/ext/intl/spoofchecker/spoofchecker_create.cpp @@ -21,14 +21,12 @@ #include #endif -extern "C" { #include "php_intl.h" #include "intl_data.h" -} #include "spoofchecker_class.h" /* {{{ Spoofchecker object constructor. */ -U_CFUNC PHP_METHOD(Spoofchecker, __construct) +PHP_METHOD(Spoofchecker, __construct) { #if U_ICU_VERSION_MAJOR_NUM < 58 int checks; diff --git a/ext/intl/spoofchecker/spoofchecker_main.cpp b/ext/intl/spoofchecker/spoofchecker_main.cpp index ddbf02a0d3ded..1ff5c095b8df3 100644 --- a/ext/intl/spoofchecker/spoofchecker_main.cpp +++ b/ext/intl/spoofchecker/spoofchecker_main.cpp @@ -21,14 +21,12 @@ #include #endif -extern "C" { #include "php_intl.h" #include "intl_convert.h" -} #include "spoofchecker_class.h" /* {{{ Checks if a given text contains any suspicious characters */ -U_CFUNC PHP_METHOD(Spoofchecker, isSuspicious) +PHP_METHOD(Spoofchecker, isSuspicious) { int32_t ret, errmask; zend_string *text; @@ -69,7 +67,7 @@ U_CFUNC PHP_METHOD(Spoofchecker, isSuspicious) /* }}} */ /* {{{ Checks if a given text contains any confusable characters */ -U_CFUNC PHP_METHOD(Spoofchecker, areConfusable) +PHP_METHOD(Spoofchecker, areConfusable) { int ret; zend_string *s1, *s2; @@ -102,7 +100,7 @@ U_CFUNC PHP_METHOD(Spoofchecker, areConfusable) /* }}} */ /* {{{ Locales to use when running checks */ -U_CFUNC PHP_METHOD(Spoofchecker, setAllowedLocales) +PHP_METHOD(Spoofchecker, setAllowedLocales) { zend_string *locales; SPOOFCHECKER_METHOD_INIT_VARS; @@ -123,7 +121,7 @@ U_CFUNC PHP_METHOD(Spoofchecker, setAllowedLocales) /* }}} */ /* {{{ Set the checks to run */ -U_CFUNC PHP_METHOD(Spoofchecker, setChecks) +PHP_METHOD(Spoofchecker, setChecks) { zend_long checks; SPOOFCHECKER_METHOD_INIT_VARS; @@ -144,7 +142,7 @@ U_CFUNC PHP_METHOD(Spoofchecker, setChecks) #if U_ICU_VERSION_MAJOR_NUM >= 58 /* {{{ Set the loosest restriction level allowed for strings. */ -U_CFUNC PHP_METHOD(Spoofchecker, setRestrictionLevel) +PHP_METHOD(Spoofchecker, setRestrictionLevel) { zend_long level; SPOOFCHECKER_METHOD_INIT_VARS; @@ -172,7 +170,7 @@ U_CFUNC PHP_METHOD(Spoofchecker, setRestrictionLevel) /* }}} */ #endif -U_CFUNC PHP_METHOD(Spoofchecker, setAllowedChars) +PHP_METHOD(Spoofchecker, setAllowedChars) { zend_string *pattern; UChar *upattern = NULL; diff --git a/ext/intl/timezone/timezone_class.cpp b/ext/intl/timezone/timezone_class.cpp index c613edf5585f1..df5540f75d8dc 100644 --- a/ext/intl/timezone/timezone_class.cpp +++ b/ext/intl/timezone/timezone_class.cpp @@ -22,32 +22,27 @@ #include #include -#include "../intl_convertcpp.h" +#include "../intl_convert.h" #include "../intl_common.h" #include "../common/common_date.h" -extern "C" { -#include "../intl_convert.h" #define USE_TIMEZONE_POINTER 1 #include "timezone_class.h" #include "timezone_arginfo.h" #include #include #include -} using icu::Calendar; /* {{{ Global variables */ -U_CDECL_BEGIN -zend_class_entry *TimeZone_ce_ptr = NULL; +zend_class_entry *TimeZone_ce_ptr = nullptr; zend_object_handlers TimeZone_handlers; -U_CDECL_END /* }}} */ /* {{{ timezone_object_construct */ -U_CFUNC void timezone_object_construct(const TimeZone *zone, zval *object, int owned) +void timezone_object_construct(const TimeZone *zone, zval *object, int owned) { TimeZone_object *to; @@ -60,7 +55,7 @@ U_CFUNC void timezone_object_construct(const TimeZone *zone, zval *object, int o /* {{{ timezone_convert_to_datetimezone * Convert from TimeZone to DateTimeZone object */ -U_CFUNC zval *timezone_convert_to_datetimezone(const TimeZone *timeZone, +zval *timezone_convert_to_datetimezone(const TimeZone *timeZone, intl_error *outside_error, zval *ret) { @@ -120,7 +115,7 @@ static void timezone_throw_exception_with_call_location(const char *msg, const c /* {{{ timezone_process_timezone_argument * TimeZone argument processor. outside_error may be nullptr (for static functions/constructors) */ -U_CFUNC TimeZone *timezone_process_timezone_argument( +TimeZone *timezone_process_timezone_argument( zend_object *timezone_object, zend_string *timezone_string, intl_error *outside_error) { std::unique_ptr timeZone; @@ -212,7 +207,7 @@ static zend_object *TimeZone_clone_obj(zend_object *object) zend_objects_clone_members(&to_new->zo, &to_orig->zo); - if (to_orig->utimezone != NULL) { + if (to_orig->utimezone != nullptr) { TimeZone *newTimeZone = to_orig->utimezone->clone(); to_new->should_delete = true; if (!newTimeZone) { @@ -240,7 +235,7 @@ static int TimeZone_compare_objects(zval *object1, zval *object2) to1 = Z_INTL_TIMEZONE_P(object1); to2 = Z_INTL_TIMEZONE_P(object2); - if (to1->utimezone == NULL || to2->utimezone == NULL) { + if (to1->utimezone == nullptr || to2->utimezone == nullptr) { zend_throw_exception(NULL, "Comparison with at least one unconstructed " "IntlTimeZone operand", 0); /* intentionally not returning */ @@ -272,7 +267,7 @@ static HashTable *TimeZone_get_debug_info(zend_object *object, int *is_temp) to = php_intl_timezone_fetch_object(object); tz = to->utimezone; - if (tz == NULL) { + if (tz == nullptr) { ZVAL_FALSE(&zv); zend_hash_str_update(debug_info, "valid", sizeof("valid") - 1, &zv); return debug_info; @@ -312,7 +307,7 @@ static HashTable *TimeZone_get_debug_info(zend_object *object, int *is_temp) static void TimeZone_object_init(TimeZone_object *to) { intl_error_init(TIMEZONE_ERROR_P(to)); - to->utimezone = NULL; + to->utimezone = nullptr; to->should_delete = 0; } /* }}} */ @@ -324,7 +319,7 @@ static void TimeZone_objects_free(zend_object *object) if (to->utimezone && to->should_delete) { delete to->utimezone; - to->utimezone = NULL; + to->utimezone = nullptr; } intl_error_reset(TIMEZONE_ERROR_P(to)); @@ -348,7 +343,7 @@ static zend_object *TimeZone_object_create(zend_class_entry *ce) /* {{{ timezone_register_IntlTimeZone_class * Initialize 'IntlTimeZone' class */ -U_CFUNC void timezone_register_IntlTimeZone_class(void) +void timezone_register_IntlTimeZone_class(void) { /* Create and register 'IntlTimeZone' class. */ TimeZone_ce_ptr = register_class_IntlTimeZone(); diff --git a/ext/intl/timezone/timezone_methods.cpp b/ext/intl/timezone/timezone_methods.cpp index 3de186a9ca031..6309b1c280ad1 100644 --- a/ext/intl/timezone/timezone_methods.cpp +++ b/ext/intl/timezone/timezone_methods.cpp @@ -22,31 +22,28 @@ #include #include #include -#include "intl_convertcpp.h" +#include "intl_convert.h" #include "../common/common_date.h" -extern "C" { #include "../php_intl.h" #define USE_TIMEZONE_POINTER 1 #include "timezone_class.h" -#include "intl_convert.h" #include #include -} #include "common/common_enum.h" using icu::Locale; using icu::Calendar; -U_CFUNC PHP_METHOD(IntlTimeZone, __construct) +PHP_METHOD(IntlTimeZone, __construct) { zend_throw_exception( NULL, "An object of this type cannot be created with the new operator", 0 ); } -U_CFUNC PHP_FUNCTION(intltz_create_time_zone) +PHP_FUNCTION(intltz_create_time_zone) { char *str_id; size_t str_id_len; @@ -69,7 +66,7 @@ U_CFUNC PHP_FUNCTION(intltz_create_time_zone) timezone_object_construct(tz, return_value, 1); } -U_CFUNC PHP_FUNCTION(intltz_from_date_time_zone) +PHP_FUNCTION(intltz_from_date_time_zone) { zval *zv_timezone; TimeZone *tz; @@ -94,7 +91,7 @@ U_CFUNC PHP_FUNCTION(intltz_from_date_time_zone) timezone_object_construct(tz, return_value, 1); } -U_CFUNC PHP_FUNCTION(intltz_create_default) +PHP_FUNCTION(intltz_create_default) { intl_error_reset(NULL); @@ -104,7 +101,7 @@ U_CFUNC PHP_FUNCTION(intltz_create_default) timezone_object_construct(tz, return_value, 1); } -U_CFUNC PHP_FUNCTION(intltz_get_gmt) +PHP_FUNCTION(intltz_get_gmt) { intl_error_reset(NULL); @@ -113,7 +110,7 @@ U_CFUNC PHP_FUNCTION(intltz_get_gmt) timezone_object_construct(TimeZone::getGMT(), return_value, 0); } -U_CFUNC PHP_FUNCTION(intltz_get_unknown) +PHP_FUNCTION(intltz_get_unknown) { intl_error_reset(NULL); @@ -122,7 +119,7 @@ U_CFUNC PHP_FUNCTION(intltz_get_unknown) timezone_object_construct(&TimeZone::getUnknown(), return_value, 0); } -U_CFUNC PHP_FUNCTION(intltz_create_enumeration) +PHP_FUNCTION(intltz_create_enumeration) { zend_string *timezone = nullptr; zend_long timezone_shift = 0; @@ -158,7 +155,7 @@ U_CFUNC PHP_FUNCTION(intltz_create_enumeration) } } -U_CFUNC PHP_FUNCTION(intltz_count_equivalent_ids) +PHP_FUNCTION(intltz_count_equivalent_ids) { char *str_id; size_t str_id_len; @@ -180,7 +177,7 @@ U_CFUNC PHP_FUNCTION(intltz_count_equivalent_ids) RETURN_LONG((zend_long)result); } -U_CFUNC PHP_FUNCTION(intltz_create_time_zone_id_enumeration) +PHP_FUNCTION(intltz_create_time_zone_id_enumeration) { zend_long zoneType, offset_arg; @@ -224,7 +221,7 @@ U_CFUNC PHP_FUNCTION(intltz_create_time_zone_id_enumeration) IntlIterator_from_StringEnumeration(se, return_value); } -U_CFUNC PHP_FUNCTION(intltz_get_canonical_id) +PHP_FUNCTION(intltz_get_canonical_id) { char *str_id; size_t str_id_len; @@ -260,7 +257,7 @@ U_CFUNC PHP_FUNCTION(intltz_get_canonical_id) } } -U_CFUNC PHP_FUNCTION(intltz_get_region) +PHP_FUNCTION(intltz_get_region) { char *str_id; size_t str_id_len; @@ -285,7 +282,7 @@ U_CFUNC PHP_FUNCTION(intltz_get_region) RETURN_STRINGL(outbuf, region_len); } -U_CFUNC PHP_FUNCTION(intltz_get_tz_data_version) +PHP_FUNCTION(intltz_get_tz_data_version) { intl_error_reset(NULL); @@ -298,7 +295,7 @@ U_CFUNC PHP_FUNCTION(intltz_get_tz_data_version) RETURN_STRING(res); } -U_CFUNC PHP_FUNCTION(intltz_get_equivalent_id) +PHP_FUNCTION(intltz_get_equivalent_id) { char *str_id; size_t str_id_len; @@ -332,7 +329,7 @@ U_CFUNC PHP_FUNCTION(intltz_get_equivalent_id) } #if U_ICU_VERSION_MAJOR_NUM >= 74 -U_CFUNC PHP_FUNCTION(intltz_get_iana_id) +PHP_FUNCTION(intltz_get_iana_id) { char *str_id; size_t str_id_len; @@ -361,7 +358,7 @@ U_CFUNC PHP_FUNCTION(intltz_get_iana_id) } #endif -U_CFUNC PHP_FUNCTION(intltz_get_id) +PHP_FUNCTION(intltz_get_id) { TIMEZONE_METHOD_INIT_VARS; @@ -384,7 +381,7 @@ U_CFUNC PHP_FUNCTION(intltz_get_id) RETVAL_NEW_STR(u8str); } -U_CFUNC PHP_FUNCTION(intltz_use_daylight_time) +PHP_FUNCTION(intltz_use_daylight_time) { TIMEZONE_METHOD_INIT_VARS; @@ -398,7 +395,7 @@ U_CFUNC PHP_FUNCTION(intltz_use_daylight_time) RETURN_BOOL(to->utimezone->useDaylightTime()); } -U_CFUNC PHP_FUNCTION(intltz_get_offset) +PHP_FUNCTION(intltz_get_offset) { double date; bool local; @@ -427,7 +424,7 @@ U_CFUNC PHP_FUNCTION(intltz_get_offset) RETURN_TRUE; } -U_CFUNC PHP_FUNCTION(intltz_get_raw_offset) +PHP_FUNCTION(intltz_get_raw_offset) { TIMEZONE_METHOD_INIT_VARS; @@ -441,7 +438,7 @@ U_CFUNC PHP_FUNCTION(intltz_get_raw_offset) RETURN_LONG(to->utimezone->getRawOffset()); } -U_CFUNC PHP_FUNCTION(intltz_has_same_rules) +PHP_FUNCTION(intltz_has_same_rules) { zval *other_object; TimeZone_object *other_to; @@ -469,7 +466,7 @@ static constexpr TimeZone::EDisplayType display_types[] = { TimeZone::SHORT_COMMONLY_USED, TimeZone::GENERIC_LOCATION }; -U_CFUNC PHP_FUNCTION(intltz_get_display_name) +PHP_FUNCTION(intltz_get_display_name) { bool daylight = 0; zend_long display_type = TimeZone::LONG; @@ -509,7 +506,7 @@ U_CFUNC PHP_FUNCTION(intltz_get_display_name) RETVAL_NEW_STR(u8str); } -U_CFUNC PHP_FUNCTION(intltz_get_dst_savings) +PHP_FUNCTION(intltz_get_dst_savings) { TIMEZONE_METHOD_INIT_VARS; @@ -523,7 +520,7 @@ U_CFUNC PHP_FUNCTION(intltz_get_dst_savings) RETURN_LONG((zend_long)to->utimezone->getDSTSavings()); } -U_CFUNC PHP_FUNCTION(intltz_to_date_time_zone) +PHP_FUNCTION(intltz_to_date_time_zone) { zval tmp; TIMEZONE_METHOD_INIT_VARS; @@ -545,7 +542,7 @@ U_CFUNC PHP_FUNCTION(intltz_to_date_time_zone) } } -U_CFUNC PHP_FUNCTION(intltz_get_error_code) +PHP_FUNCTION(intltz_get_error_code) { TIMEZONE_METHOD_INIT_VARS @@ -562,7 +559,7 @@ U_CFUNC PHP_FUNCTION(intltz_get_error_code) RETURN_LONG((zend_long)TIMEZONE_ERROR_CODE(to)); } -U_CFUNC PHP_FUNCTION(intltz_get_error_message) +PHP_FUNCTION(intltz_get_error_message) { zend_string* message = NULL; TIMEZONE_METHOD_INIT_VARS @@ -586,7 +583,7 @@ U_CFUNC PHP_FUNCTION(intltz_get_error_message) /* {{{ Translate a system timezone (e.g. "America/Los_Angeles" into a Windows Timezone (e.g. "Pacific Standard Time") */ -U_CFUNC PHP_FUNCTION(intltz_get_windows_id) +PHP_FUNCTION(intltz_get_windows_id) { zend_string *id, *winID; UnicodeString uID, uWinID; @@ -622,7 +619,7 @@ U_CFUNC PHP_FUNCTION(intltz_get_windows_id) /* {{{ Translate a windows timezone (e.g. "Pacific Time Zone" into a System Timezone (e.g. "America/Los_Angeles") */ -U_CFUNC PHP_FUNCTION(intltz_get_id_for_windows_id) +PHP_FUNCTION(intltz_get_id_for_windows_id) { zend_string *winID, *region = NULL, *id; UnicodeString uWinID, uID; diff --git a/ext/intl/transliterator/transliterator_class.cpp b/ext/intl/transliterator/transliterator_class.cpp index fd0cd4f3c3e64..99fdd454e9052 100644 --- a/ext/intl/transliterator/transliterator_class.cpp +++ b/ext/intl/transliterator/transliterator_class.cpp @@ -13,13 +13,11 @@ */ #include "transliterator_class.h" -extern "C" { #include "php_intl.h" #include "intl_error.h" #include "intl_convert.h" #include "intl_data.h" #include "transliterator_arginfo.h" -} #include @@ -30,7 +28,7 @@ zend_object_handlers Transliterator_handlers; /* {{{ int transliterator_object_construct( zval *object, UTransliterator *utrans, UErrorCode *status ) * Initialize internals of Transliterator_object. */ -U_CFUNC int transliterator_object_construct( zval *object, +int transliterator_object_construct( zval *object, UTransliterator *utrans, UErrorCode *status ) { @@ -160,7 +158,7 @@ static zend_object *Transliterator_clone_obj( zend_object *object ) /* {{{ transliterator_register_Transliterator_class * Initialize 'Transliterator' class */ -U_CFUNC void transliterator_register_Transliterator_class( void ) +void transliterator_register_Transliterator_class( void ) { /* Create and register 'Transliterator' class. */ Transliterator_ce_ptr = register_class_Transliterator(); diff --git a/ext/intl/transliterator/transliterator_class.h b/ext/intl/transliterator/transliterator_class.h index 7e02d6fa5e287..2ce85d6cfdb74 100644 --- a/ext/intl/transliterator/transliterator_class.h +++ b/ext/intl/transliterator/transliterator_class.h @@ -17,14 +17,8 @@ #include -#ifdef __cplusplus -extern "C" { -#endif #include "intl_common.h" #include "intl_error.h" -#ifdef __cplusplus -} -#endif #include @@ -62,9 +56,6 @@ static inline Transliterator_object *php_intl_transliterator_fetch_object(zend_o RETURN_THROWS(); \ } -#ifdef __cplusplus -extern "C" { -#endif int transliterator_object_construct( zval *object, UTransliterator *utrans, UErrorCode *status ); @@ -73,8 +64,5 @@ void transliterator_register_Transliterator_class( void ); extern zend_class_entry *Transliterator_ce_ptr; extern zend_object_handlers Transliterator_handlers; -#ifdef __cplusplus -} -#endif #endif /* #ifndef TRANSLITERATOR_CLASS_H */ diff --git a/ext/intl/transliterator/transliterator_methods.cpp b/ext/intl/transliterator/transliterator_methods.cpp index d8a8cbb7a49ec..2920e1c079cc0 100644 --- a/ext/intl/transliterator/transliterator_methods.cpp +++ b/ext/intl/transliterator/transliterator_methods.cpp @@ -21,11 +21,9 @@ #include #endif -extern "C" { #include "php_intl.h" #include "intl_data.h" #include "intl_convert.h" -} #include "transliterator.h" #include "transliterator_class.h" @@ -99,7 +97,7 @@ static int create_transliterator( char *str_id, size_t str_id_len, zend_long dir } /* {{{ Opens a transliterator by id. */ -U_CFUNC PHP_FUNCTION( transliterator_create ) +PHP_FUNCTION( transliterator_create ) { char *str_id; size_t str_id_len; @@ -126,7 +124,7 @@ U_CFUNC PHP_FUNCTION( transliterator_create ) /* }}} */ /* {{{ Opens a transliterator by id. */ -U_CFUNC PHP_FUNCTION( transliterator_create_from_rules ) +PHP_FUNCTION( transliterator_create_from_rules ) { char *str_rules; size_t str_rules_len; @@ -192,7 +190,7 @@ U_CFUNC PHP_FUNCTION( transliterator_create_from_rules ) /* }}} */ /* {{{ Opens the inverse transliterator transliterator. */ -U_CFUNC PHP_FUNCTION( transliterator_create_inverse ) +PHP_FUNCTION( transliterator_create_inverse ) { Transliterator_object *to_orig; UTransliterator *utrans; @@ -221,7 +219,7 @@ U_CFUNC PHP_FUNCTION( transliterator_create_inverse ) /* }}} */ /* {{{ Return an array with the registered transliterator IDs. */ -U_CFUNC PHP_FUNCTION( transliterator_list_ids ) +PHP_FUNCTION( transliterator_list_ids ) { UEnumeration *en; const UChar *elem; @@ -264,7 +262,7 @@ U_CFUNC PHP_FUNCTION( transliterator_list_ids ) /* }}} */ /* {{{ Transliterate a string. */ -U_CFUNC PHP_FUNCTION( transliterator_transliterate ) +PHP_FUNCTION( transliterator_transliterate ) { char *str; UChar *ustr = nullptr, @@ -419,7 +417,7 @@ U_CFUNC PHP_FUNCTION( transliterator_transliterate ) } /* }}} */ -U_CFUNC PHP_METHOD( Transliterator, __construct ) +PHP_METHOD( Transliterator, __construct ) { /* this constructor shouldn't be called as it's private */ zend_throw_exception( nullptr, @@ -428,7 +426,7 @@ U_CFUNC PHP_METHOD( Transliterator, __construct ) } /* {{{ Get the last error code for this transliterator. */ -U_CFUNC PHP_FUNCTION( transliterator_get_error_code ) +PHP_FUNCTION( transliterator_get_error_code ) { TRANSLITERATOR_METHOD_INIT_VARS @@ -447,7 +445,7 @@ U_CFUNC PHP_FUNCTION( transliterator_get_error_code ) /* {{{ Get the last error message for this transliterator. */ -U_CFUNC PHP_FUNCTION( transliterator_get_error_message ) +PHP_FUNCTION( transliterator_get_error_message ) { zend_string* message = nullptr; TRANSLITERATOR_METHOD_INIT_VARS diff --git a/ext/intl/uchar/uchar.cpp b/ext/intl/uchar/uchar.cpp index f1f777f0ea3eb..51f3c12eaa68d 100644 --- a/ext/intl/uchar/uchar.cpp +++ b/ext/intl/uchar/uchar.cpp @@ -1,4 +1,3 @@ -extern "C" { #include "uchar.h" #include "intl_data.h" #include "intl_convert.h" @@ -7,7 +6,6 @@ extern "C" { #include #include "uchar_arginfo.h" -} #define IC_METHOD(mname) PHP_METHOD(IntlChar, mname) From f0331e78300841042f9656bbfbc0e30b12c563e4 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Mon, 10 Nov 2025 13:04:58 +0000 Subject: [PATCH 2/8] necessary change for C++ due to stricter cast rules. --- build/gen_stub.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/gen_stub.php b/build/gen_stub.php index acee1e6ca0981..5cd403eb11858 100755 --- a/build/gen_stub.php +++ b/build/gen_stub.php @@ -5309,7 +5309,7 @@ static function (FuncInfo $funcInfo) use ($allConstInfos, $phpVersionIdMinimumCo foreach ($funcInfo->attributes as $key => $attribute) { $code .= $attribute->generateCode( - "zend_add_function_attribute(zend_hash_str_find_ptr($functionTable, \"" . $funcInfo->name->getNameForAttributes() . "\", sizeof(\"" . $funcInfo->name->getNameForAttributes() . "\") - 1)", + "zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr($functionTable, \"" . $funcInfo->name->getNameForAttributes() . "\", sizeof(\"" . $funcInfo->name->getNameForAttributes() . "\") - 1)", "func_" . $funcInfo->name->getNameForAttributes() . "_$key", $allConstInfos, $phpVersionIdMinimumCompatibility, @@ -5320,7 +5320,7 @@ static function (FuncInfo $funcInfo) use ($allConstInfos, $phpVersionIdMinimumCo foreach ($funcInfo->args as $index => $arg) { foreach ($arg->attributes as $key => $attribute) { $code .= $attribute->generateCode( - "zend_add_parameter_attribute(zend_hash_str_find_ptr($functionTable, \"" . $funcInfo->name->getNameForAttributes() . "\", sizeof(\"" . $funcInfo->name->getNameForAttributes() . "\") - 1), $index", + "zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr($functionTable, \"" . $funcInfo->name->getNameForAttributes() . "\", sizeof(\"" . $funcInfo->name->getNameForAttributes() . "\") - 1), $index", "func_{$funcInfo->name->getNameForAttributes()}_arg{$index}_$key", $allConstInfos, $phpVersionIdMinimumCompatibility, From 34b3b64f7811376624a333693c6ada721d67d6b9 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Mon, 10 Nov 2025 13:05:21 +0000 Subject: [PATCH 3/8] making php_date.h header usable within C++ context --- ext/date/php_date.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ext/date/php_date.h b/ext/date/php_date.h index f5f43bc7dfb0f..ead2a61f6c73a 100644 --- a/ext/date/php_date.h +++ b/ext/date/php_date.h @@ -129,6 +129,8 @@ ZEND_END_MODULE_GLOBALS(date) #define DATEG(v) ZEND_MODULE_GLOBALS_ACCESSOR(date, v) +BEGIN_EXTERN_C() + PHPAPI time_t php_time(void); /* Backwards compatibility wrapper */ @@ -162,5 +164,6 @@ PHPAPI zval *php_date_instantiate(zend_class_entry *pce, zval *object); PHPAPI bool php_date_initialize(php_date_obj *dateobj, const char *time_str, size_t time_str_len, const char *format, zval *timezone_object, int flags); PHPAPI void php_date_initialize_from_ts_long(php_date_obj *dateobj, zend_long sec, int usec); PHPAPI bool php_date_initialize_from_ts_double(php_date_obj *dateobj, double ts); +END_EXTERN_C() #endif /* PHP_DATE_H */ From b83cfd1270dc6e25c1652aef613ba910ffc6bf97 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Mon, 10 Nov 2025 18:21:36 +0000 Subject: [PATCH 4/8] fix build partly --- ext/intl/intl_common.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ext/intl/intl_common.h b/ext/intl/intl_common.h index cef96325e9afb..1d8deec94a452 100644 --- a/ext/intl/intl_common.h +++ b/ext/intl/intl_common.h @@ -18,9 +18,7 @@ #define INTL_COMMON_H /* Auxiliary macros */ -BEGIN_EXTERN_C() #include -END_EXTERN_C() #include #ifndef UBYTES @@ -41,8 +39,6 @@ END_EXTERN_C() #define INTL_ZSTR_VAL(str) (UChar*) ZSTR_VAL(str) #define INTL_ZSTR_LEN(str) UCHARS(ZSTR_LEN(str)) -BEGIN_EXTERN_C() extern zend_class_entry *IntlException_ce_ptr; -END_EXTERN_C() #endif /* INTL_COMMON_H */ From f823447eb7c6022a730cf38dbf748d96c8abc57a Mon Sep 17 00:00:00 2001 From: David Carlier Date: Mon, 10 Nov 2025 18:59:46 +0000 Subject: [PATCH 5/8] C++fy zend_hash.h as well --- Zend/zend_hash.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Zend/zend_hash.h b/Zend/zend_hash.h index 70d9721cb7a17..6ba63b787c6d8 100644 --- a/Zend/zend_hash.h +++ b/Zend/zend_hash.h @@ -26,6 +26,8 @@ #include "zend_string.h" #include "zend_sort.h" +BEGIN_EXTERN_C() + typedef enum { HASH_KEY_IS_STRING = 1, HASH_KEY_IS_LONG, @@ -1707,4 +1709,5 @@ static zend_always_inline void _zend_hash_append_ind(HashTable *ht, zend_string ht->nNumOfElements++; } +END_EXTERN_C() #endif /* ZEND_HASH_H */ From 5b599ee6e55412db5e038901b67eb4826904622e Mon Sep 17 00:00:00 2001 From: David Carlier Date: Wed, 12 Nov 2025 21:58:44 +0000 Subject: [PATCH 6/8] macos fix attempt --- ext/intl/config.m4 | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ext/intl/config.m4 b/ext/intl/config.m4 index 110007248993d..f589d2871c187 100644 --- a/ext/intl/config.m4 +++ b/ext/intl/config.m4 @@ -7,11 +7,7 @@ if test "$PHP_INTL" != "no"; then PHP_SETUP_ICU([INTL_SHARED_LIBADD]) PHP_SUBST([INTL_SHARED_LIBADD]) INTL_COMMON_FLAGS="$ICU_CFLAGS -Wno-write-strings -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1" - PHP_NEW_EXTENSION([intl], m4_normalize([ - intl_convert.cpp - intl_error.cpp - php_intl.cpp - ]), + PHP_NEW_EXTENSION([intl], [], [$ext_shared],, [$INTL_COMMON_FLAGS], [cxx]) @@ -44,6 +40,9 @@ if test "$PHP_INTL" != "no"; then formatter/formatter_class.cpp \ grapheme/grapheme_string.cpp \ grapheme/grapheme_util.cpp \ + intl_convert.cpp \ + intl_error.cpp \ + php_intl.cpp \ msgformat/msgformat_helpers.cpp \ rangeformatter/rangeformatter_class.cpp \ timezone/timezone_class.cpp \ From c2cc7d361341b9670419f1c9a4a2952d2c362c17 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Wed, 12 Nov 2025 22:53:07 +0000 Subject: [PATCH 7/8] (re)generate stubs --- ext/curl/curl_arginfo.h | 4 +- ext/date/php_date_arginfo.h | 38 +++--- ext/enchant/enchant_arginfo.h | 12 +- ext/fileinfo/fileinfo_arginfo.h | 2 +- ext/ftp/ftp_arginfo.h | 2 +- ext/gd/gd_arginfo.h | 2 +- ext/hash/hash_arginfo.h | 24 ++-- ext/ldap/ldap_arginfo.h | 18 +-- ext/libxml/libxml_arginfo.h | 2 +- ext/mysqli/mysqli_arginfo.h | 32 ++--- ext/odbc/odbc_arginfo.h | 6 +- ext/openssl/openssl_arginfo.h | 88 ++++++------- ext/pdo/pdo_dbh_arginfo.h | 4 +- ext/pgsql/pgsql_arginfo.h | 50 ++++---- ext/random/random_arginfo.h | 2 +- ext/reflection/php_reflection_arginfo.h | 12 +- ext/shmop/shmop_arginfo.h | 2 +- ext/sodium/libsodium_arginfo.h | 158 ++++++++++++------------ ext/spl/spl_directory_arginfo.h | 2 +- ext/spl/spl_fixedarray_arginfo.h | 2 +- ext/spl/spl_observer_arginfo.h | 6 +- ext/standard/basic_functions_arginfo.h | 16 +-- ext/uri/php_uri_arginfo.h | 4 +- ext/xml/xml_arginfo.h | 4 +- ext/zend_test/test_arginfo.h | 20 +-- ext/zip/php_zip_arginfo.h | 26 ++-- 26 files changed, 269 insertions(+), 269 deletions(-) diff --git a/ext/curl/curl_arginfo.h b/ext/curl/curl_arginfo.h index 7e4a5789d599a..73021240fd107 100644 --- a/ext/curl/curl_arginfo.h +++ b/ext/curl/curl_arginfo.h @@ -986,14 +986,14 @@ static void register_curl_symbols(int module_number) REGISTER_LONG_CONSTANT("CURLOPT_SAFE_UPLOAD", CURLOPT_SAFE_UPLOAD, CONST_PERSISTENT); - zend_attribute *attribute_Deprecated_func_curl_close_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "curl_close", sizeof("curl_close") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_curl_close_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "curl_close", sizeof("curl_close") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_curl_close_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_5)); attribute_Deprecated_func_curl_close_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_curl_close_0_arg1_str = zend_string_init("as it has no effect since PHP 8.0", strlen("as it has no effect since PHP 8.0"), 1); ZVAL_STR(&attribute_Deprecated_func_curl_close_0->args[1].value, attribute_Deprecated_func_curl_close_0_arg1_str); attribute_Deprecated_func_curl_close_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_attribute *attribute_Deprecated_func_curl_share_close_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "curl_share_close", sizeof("curl_share_close") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_curl_share_close_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "curl_share_close", sizeof("curl_share_close") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_curl_share_close_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_5)); attribute_Deprecated_func_curl_share_close_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); ZVAL_STR_COPY(&attribute_Deprecated_func_curl_share_close_0->args[1].value, attribute_Deprecated_func_curl_close_0_arg1_str); diff --git a/ext/date/php_date_arginfo.h b/ext/date/php_date_arginfo.h index 74541e13a5c19..8ef688c16dc71 100644 --- a/ext/date/php_date_arginfo.h +++ b/ext/date/php_date_arginfo.h @@ -813,27 +813,27 @@ static void register_php_date_symbols(int module_number) zend_constant *const_SUNFUNCS_RET_DOUBLE = REGISTER_LONG_CONSTANT("SUNFUNCS_RET_DOUBLE", SUNFUNCS_RET_DOUBLE, CONST_PERSISTENT | CONST_DEPRECATED); - zend_attribute *attribute_Deprecated_func_strftime_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "strftime", sizeof("strftime") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_strftime_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "strftime", sizeof("strftime") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_strftime_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_1)); attribute_Deprecated_func_strftime_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_strftime_0_arg1_str = zend_string_init("use IntlDateFormatter::format() instead", strlen("use IntlDateFormatter::format() instead"), 1); ZVAL_STR(&attribute_Deprecated_func_strftime_0->args[1].value, attribute_Deprecated_func_strftime_0_arg1_str); attribute_Deprecated_func_strftime_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_attribute *attribute_Deprecated_func_gmstrftime_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "gmstrftime", sizeof("gmstrftime") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_gmstrftime_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "gmstrftime", sizeof("gmstrftime") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_gmstrftime_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_1)); attribute_Deprecated_func_gmstrftime_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); ZVAL_STR_COPY(&attribute_Deprecated_func_gmstrftime_0->args[1].value, attribute_Deprecated_func_strftime_0_arg1_str); attribute_Deprecated_func_gmstrftime_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_attribute *attribute_Deprecated_func_date_sunrise_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "date_sunrise", sizeof("date_sunrise") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_date_sunrise_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "date_sunrise", sizeof("date_sunrise") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_date_sunrise_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_1)); attribute_Deprecated_func_date_sunrise_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_date_sunrise_0_arg1_str = zend_string_init("use date_sun_info() instead", strlen("use date_sun_info() instead"), 1); ZVAL_STR(&attribute_Deprecated_func_date_sunrise_0->args[1].value, attribute_Deprecated_func_date_sunrise_0_arg1_str); attribute_Deprecated_func_date_sunrise_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_attribute *attribute_Deprecated_func_date_sunset_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "date_sunset", sizeof("date_sunset") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_date_sunset_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "date_sunset", sizeof("date_sunset") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_date_sunset_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_1)); attribute_Deprecated_func_date_sunset_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); ZVAL_STR_COPY(&attribute_Deprecated_func_date_sunset_0->args[1].value, attribute_Deprecated_func_date_sunrise_0_arg1_str); @@ -980,7 +980,7 @@ static zend_class_entry *register_class_DateTimeInterface(void) attribute_Deprecated_const_RFC7231_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_attribute *attribute_Deprecated_func___wakeup_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "__wakeup", sizeof("__wakeup") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func___wakeup_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(&class_entry->function_table, "__wakeup", sizeof("__wakeup") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func___wakeup_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_5)); attribute_Deprecated_func___wakeup_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func___wakeup_0_arg1_str = zend_string_init("this method is obsolete, as serialization hooks are provided by __unserialize() and __serialize()", strlen("this method is obsolete, as serialization hooks are provided by __unserialize() and __serialize()"), 1); @@ -999,7 +999,7 @@ static zend_class_entry *register_class_DateTime(zend_class_entry *class_entry_D zend_class_implements(class_entry, 1, class_entry_DateTimeInterface); - zend_attribute *attribute_Deprecated_func___wakeup_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "__wakeup", sizeof("__wakeup") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func___wakeup_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(&class_entry->function_table, "__wakeup", sizeof("__wakeup") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func___wakeup_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_5)); attribute_Deprecated_func___wakeup_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func___wakeup_0_arg1_str = zend_string_init("this method is obsolete, as serialization hooks are provided by __unserialize() and __serialize()", strlen("this method is obsolete, as serialization hooks are provided by __unserialize() and __serialize()"), 1); @@ -1018,7 +1018,7 @@ static zend_class_entry *register_class_DateTimeImmutable(zend_class_entry *clas zend_class_implements(class_entry, 1, class_entry_DateTimeInterface); - zend_attribute *attribute_Deprecated_func___wakeup_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "__wakeup", sizeof("__wakeup") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func___wakeup_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(&class_entry->function_table, "__wakeup", sizeof("__wakeup") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func___wakeup_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_5)); attribute_Deprecated_func___wakeup_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func___wakeup_0_arg1_str = zend_string_init("this method is obsolete, as serialization hooks are provided by __unserialize() and __serialize()", strlen("this method is obsolete, as serialization hooks are provided by __unserialize() and __serialize()"), 1); @@ -1026,63 +1026,63 @@ static zend_class_entry *register_class_DateTimeImmutable(zend_class_entry *clas attribute_Deprecated_func___wakeup_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); zend_string *attribute_name_NoDiscard_func_modify_0 = zend_string_init_interned("NoDiscard", sizeof("NoDiscard") - 1, true); - zend_attribute *attribute_NoDiscard_func_modify_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "modify", sizeof("modify") - 1), attribute_name_NoDiscard_func_modify_0, 1); + zend_attribute *attribute_NoDiscard_func_modify_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(&class_entry->function_table, "modify", sizeof("modify") - 1), attribute_name_NoDiscard_func_modify_0, 1); zend_string_release_ex(attribute_name_NoDiscard_func_modify_0, true); zend_string *attribute_NoDiscard_func_modify_0_arg0_str = zend_string_init("as DateTimeImmutable::modify() does not modify the object itself", strlen("as DateTimeImmutable::modify() does not modify the object itself"), 1); ZVAL_STR(&attribute_NoDiscard_func_modify_0->args[0].value, attribute_NoDiscard_func_modify_0_arg0_str); attribute_NoDiscard_func_modify_0->args[0].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); zend_string *attribute_name_NoDiscard_func_add_0 = zend_string_init_interned("NoDiscard", sizeof("NoDiscard") - 1, true); - zend_attribute *attribute_NoDiscard_func_add_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "add", sizeof("add") - 1), attribute_name_NoDiscard_func_add_0, 1); + zend_attribute *attribute_NoDiscard_func_add_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(&class_entry->function_table, "add", sizeof("add") - 1), attribute_name_NoDiscard_func_add_0, 1); zend_string_release_ex(attribute_name_NoDiscard_func_add_0, true); zend_string *attribute_NoDiscard_func_add_0_arg0_str = zend_string_init("as DateTimeImmutable::add() does not modify the object itself", strlen("as DateTimeImmutable::add() does not modify the object itself"), 1); ZVAL_STR(&attribute_NoDiscard_func_add_0->args[0].value, attribute_NoDiscard_func_add_0_arg0_str); attribute_NoDiscard_func_add_0->args[0].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); zend_string *attribute_name_NoDiscard_func_sub_0 = zend_string_init_interned("NoDiscard", sizeof("NoDiscard") - 1, true); - zend_attribute *attribute_NoDiscard_func_sub_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "sub", sizeof("sub") - 1), attribute_name_NoDiscard_func_sub_0, 1); + zend_attribute *attribute_NoDiscard_func_sub_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(&class_entry->function_table, "sub", sizeof("sub") - 1), attribute_name_NoDiscard_func_sub_0, 1); zend_string_release_ex(attribute_name_NoDiscard_func_sub_0, true); zend_string *attribute_NoDiscard_func_sub_0_arg0_str = zend_string_init("as DateTimeImmutable::sub() does not modify the object itself", strlen("as DateTimeImmutable::sub() does not modify the object itself"), 1); ZVAL_STR(&attribute_NoDiscard_func_sub_0->args[0].value, attribute_NoDiscard_func_sub_0_arg0_str); attribute_NoDiscard_func_sub_0->args[0].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); zend_string *attribute_name_NoDiscard_func_settimezone_0 = zend_string_init_interned("NoDiscard", sizeof("NoDiscard") - 1, true); - zend_attribute *attribute_NoDiscard_func_settimezone_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "settimezone", sizeof("settimezone") - 1), attribute_name_NoDiscard_func_settimezone_0, 1); + zend_attribute *attribute_NoDiscard_func_settimezone_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(&class_entry->function_table, "settimezone", sizeof("settimezone") - 1), attribute_name_NoDiscard_func_settimezone_0, 1); zend_string_release_ex(attribute_name_NoDiscard_func_settimezone_0, true); zend_string *attribute_NoDiscard_func_settimezone_0_arg0_str = zend_string_init("as DateTimeImmutable::setTimezone() does not modify the object itself", strlen("as DateTimeImmutable::setTimezone() does not modify the object itself"), 1); ZVAL_STR(&attribute_NoDiscard_func_settimezone_0->args[0].value, attribute_NoDiscard_func_settimezone_0_arg0_str); attribute_NoDiscard_func_settimezone_0->args[0].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); zend_string *attribute_name_NoDiscard_func_settime_0 = zend_string_init_interned("NoDiscard", sizeof("NoDiscard") - 1, true); - zend_attribute *attribute_NoDiscard_func_settime_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "settime", sizeof("settime") - 1), attribute_name_NoDiscard_func_settime_0, 1); + zend_attribute *attribute_NoDiscard_func_settime_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(&class_entry->function_table, "settime", sizeof("settime") - 1), attribute_name_NoDiscard_func_settime_0, 1); zend_string_release_ex(attribute_name_NoDiscard_func_settime_0, true); zend_string *attribute_NoDiscard_func_settime_0_arg0_str = zend_string_init("as DateTimeImmutable::setTime() does not modify the object itself", strlen("as DateTimeImmutable::setTime() does not modify the object itself"), 1); ZVAL_STR(&attribute_NoDiscard_func_settime_0->args[0].value, attribute_NoDiscard_func_settime_0_arg0_str); attribute_NoDiscard_func_settime_0->args[0].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); zend_string *attribute_name_NoDiscard_func_setdate_0 = zend_string_init_interned("NoDiscard", sizeof("NoDiscard") - 1, true); - zend_attribute *attribute_NoDiscard_func_setdate_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "setdate", sizeof("setdate") - 1), attribute_name_NoDiscard_func_setdate_0, 1); + zend_attribute *attribute_NoDiscard_func_setdate_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(&class_entry->function_table, "setdate", sizeof("setdate") - 1), attribute_name_NoDiscard_func_setdate_0, 1); zend_string_release_ex(attribute_name_NoDiscard_func_setdate_0, true); zend_string *attribute_NoDiscard_func_setdate_0_arg0_str = zend_string_init("as DateTimeImmutable::setDate() does not modify the object itself", strlen("as DateTimeImmutable::setDate() does not modify the object itself"), 1); ZVAL_STR(&attribute_NoDiscard_func_setdate_0->args[0].value, attribute_NoDiscard_func_setdate_0_arg0_str); attribute_NoDiscard_func_setdate_0->args[0].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); zend_string *attribute_name_NoDiscard_func_setisodate_0 = zend_string_init_interned("NoDiscard", sizeof("NoDiscard") - 1, true); - zend_attribute *attribute_NoDiscard_func_setisodate_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "setisodate", sizeof("setisodate") - 1), attribute_name_NoDiscard_func_setisodate_0, 1); + zend_attribute *attribute_NoDiscard_func_setisodate_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(&class_entry->function_table, "setisodate", sizeof("setisodate") - 1), attribute_name_NoDiscard_func_setisodate_0, 1); zend_string_release_ex(attribute_name_NoDiscard_func_setisodate_0, true); zend_string *attribute_NoDiscard_func_setisodate_0_arg0_str = zend_string_init("as DateTimeImmutable::setISODate() does not modify the object itself", strlen("as DateTimeImmutable::setISODate() does not modify the object itself"), 1); ZVAL_STR(&attribute_NoDiscard_func_setisodate_0->args[0].value, attribute_NoDiscard_func_setisodate_0_arg0_str); attribute_NoDiscard_func_setisodate_0->args[0].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); zend_string *attribute_name_NoDiscard_func_settimestamp_0 = zend_string_init_interned("NoDiscard", sizeof("NoDiscard") - 1, true); - zend_attribute *attribute_NoDiscard_func_settimestamp_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "settimestamp", sizeof("settimestamp") - 1), attribute_name_NoDiscard_func_settimestamp_0, 1); + zend_attribute *attribute_NoDiscard_func_settimestamp_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(&class_entry->function_table, "settimestamp", sizeof("settimestamp") - 1), attribute_name_NoDiscard_func_settimestamp_0, 1); zend_string_release_ex(attribute_name_NoDiscard_func_settimestamp_0, true); zend_string *attribute_NoDiscard_func_settimestamp_0_arg0_str = zend_string_init("as DateTimeImmutable::setTimestamp() does not modify the object itself", strlen("as DateTimeImmutable::setTimestamp() does not modify the object itself"), 1); ZVAL_STR(&attribute_NoDiscard_func_settimestamp_0->args[0].value, attribute_NoDiscard_func_settimestamp_0_arg0_str); attribute_NoDiscard_func_settimestamp_0->args[0].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); zend_string *attribute_name_NoDiscard_func_setmicrosecond_0 = zend_string_init_interned("NoDiscard", sizeof("NoDiscard") - 1, true); - zend_attribute *attribute_NoDiscard_func_setmicrosecond_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "setmicrosecond", sizeof("setmicrosecond") - 1), attribute_name_NoDiscard_func_setmicrosecond_0, 1); + zend_attribute *attribute_NoDiscard_func_setmicrosecond_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(&class_entry->function_table, "setmicrosecond", sizeof("setmicrosecond") - 1), attribute_name_NoDiscard_func_setmicrosecond_0, 1); zend_string_release_ex(attribute_name_NoDiscard_func_setmicrosecond_0, true); zend_string *attribute_NoDiscard_func_setmicrosecond_0_arg0_str = zend_string_init("as DateTimeImmutable::setMicrosecond() does not modify the object itself", strlen("as DateTimeImmutable::setMicrosecond() does not modify the object itself"), 1); ZVAL_STR(&attribute_NoDiscard_func_setmicrosecond_0->args[0].value, attribute_NoDiscard_func_setmicrosecond_0_arg0_str); @@ -1183,7 +1183,7 @@ static zend_class_entry *register_class_DateTimeZone(void) zend_string_release_ex(const_PER_COUNTRY_name, true); - zend_attribute *attribute_Deprecated_func___wakeup_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "__wakeup", sizeof("__wakeup") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func___wakeup_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(&class_entry->function_table, "__wakeup", sizeof("__wakeup") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func___wakeup_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_5)); attribute_Deprecated_func___wakeup_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func___wakeup_0_arg1_str = zend_string_init("this method is obsolete, as serialization hooks are provided by __unserialize() and __serialize()", strlen("this method is obsolete, as serialization hooks are provided by __unserialize() and __serialize()"), 1); @@ -1201,7 +1201,7 @@ static zend_class_entry *register_class_DateInterval(void) class_entry = zend_register_internal_class_with_flags(&ce, NULL, 0); - zend_attribute *attribute_Deprecated_func___wakeup_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "__wakeup", sizeof("__wakeup") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func___wakeup_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(&class_entry->function_table, "__wakeup", sizeof("__wakeup") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func___wakeup_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_5)); attribute_Deprecated_func___wakeup_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func___wakeup_0_arg1_str = zend_string_init("this method is obsolete, as serialization hooks are provided by __unserialize() and __serialize()", strlen("this method is obsolete, as serialization hooks are provided by __unserialize() and __serialize()"), 1); @@ -1278,7 +1278,7 @@ static zend_class_entry *register_class_DatePeriod(zend_class_entry *class_entry zend_string_release_ex(property_include_end_date_name, true); - zend_attribute *attribute_Deprecated_func___wakeup_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "__wakeup", sizeof("__wakeup") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func___wakeup_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(&class_entry->function_table, "__wakeup", sizeof("__wakeup") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func___wakeup_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_5)); attribute_Deprecated_func___wakeup_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func___wakeup_0_arg1_str = zend_string_init("this method is obsolete, as serialization hooks are provided by __unserialize() and __serialize()", strlen("this method is obsolete, as serialization hooks are provided by __unserialize() and __serialize()"), 1); diff --git a/ext/enchant/enchant_arginfo.h b/ext/enchant/enchant_arginfo.h index 01681072346a0..a779b3bdb2f6e 100644 --- a/ext/enchant/enchant_arginfo.h +++ b/ext/enchant/enchant_arginfo.h @@ -163,36 +163,36 @@ static void register_enchant_symbols(int module_number) #endif - zend_attribute *attribute_Deprecated_func_enchant_broker_free_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "enchant_broker_free", sizeof("enchant_broker_free") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_enchant_broker_free_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "enchant_broker_free", sizeof("enchant_broker_free") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_enchant_broker_free_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_0)); attribute_Deprecated_func_enchant_broker_free_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_enchant_broker_free_0_arg1_str = zend_string_init("as EnchantBroker objects are freed automatically", strlen("as EnchantBroker objects are freed automatically"), 1); ZVAL_STR(&attribute_Deprecated_func_enchant_broker_free_0->args[1].value, attribute_Deprecated_func_enchant_broker_free_0_arg1_str); attribute_Deprecated_func_enchant_broker_free_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_attribute *attribute_Deprecated_func_enchant_broker_set_dict_path_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "enchant_broker_set_dict_path", sizeof("enchant_broker_set_dict_path") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 1); + zend_attribute *attribute_Deprecated_func_enchant_broker_set_dict_path_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "enchant_broker_set_dict_path", sizeof("enchant_broker_set_dict_path") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 1); ZVAL_STR(&attribute_Deprecated_func_enchant_broker_set_dict_path_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_0)); attribute_Deprecated_func_enchant_broker_set_dict_path_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); - zend_attribute *attribute_Deprecated_func_enchant_broker_get_dict_path_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "enchant_broker_get_dict_path", sizeof("enchant_broker_get_dict_path") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 1); + zend_attribute *attribute_Deprecated_func_enchant_broker_get_dict_path_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "enchant_broker_get_dict_path", sizeof("enchant_broker_get_dict_path") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 1); ZVAL_STR(&attribute_Deprecated_func_enchant_broker_get_dict_path_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_0)); attribute_Deprecated_func_enchant_broker_get_dict_path_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); - zend_attribute *attribute_Deprecated_func_enchant_broker_free_dict_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "enchant_broker_free_dict", sizeof("enchant_broker_free_dict") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_enchant_broker_free_dict_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "enchant_broker_free_dict", sizeof("enchant_broker_free_dict") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_enchant_broker_free_dict_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_0)); attribute_Deprecated_func_enchant_broker_free_dict_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_enchant_broker_free_dict_0_arg1_str = zend_string_init("as EnchantDictionary objects are freed automatically", strlen("as EnchantDictionary objects are freed automatically"), 1); ZVAL_STR(&attribute_Deprecated_func_enchant_broker_free_dict_0->args[1].value, attribute_Deprecated_func_enchant_broker_free_dict_0_arg1_str); attribute_Deprecated_func_enchant_broker_free_dict_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_attribute *attribute_Deprecated_func_enchant_dict_add_to_personal_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "enchant_dict_add_to_personal", sizeof("enchant_dict_add_to_personal") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_enchant_dict_add_to_personal_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "enchant_dict_add_to_personal", sizeof("enchant_dict_add_to_personal") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_enchant_dict_add_to_personal_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_0)); attribute_Deprecated_func_enchant_dict_add_to_personal_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_enchant_dict_add_to_personal_0_arg1_str = zend_string_init("use enchant_dict_add() instead", strlen("use enchant_dict_add() instead"), 1); ZVAL_STR(&attribute_Deprecated_func_enchant_dict_add_to_personal_0->args[1].value, attribute_Deprecated_func_enchant_dict_add_to_personal_0_arg1_str); attribute_Deprecated_func_enchant_dict_add_to_personal_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_attribute *attribute_Deprecated_func_enchant_dict_is_in_session_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "enchant_dict_is_in_session", sizeof("enchant_dict_is_in_session") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_enchant_dict_is_in_session_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "enchant_dict_is_in_session", sizeof("enchant_dict_is_in_session") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_enchant_dict_is_in_session_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_0)); attribute_Deprecated_func_enchant_dict_is_in_session_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_enchant_dict_is_in_session_0_arg1_str = zend_string_init("use enchant_dict_is_added() instead", strlen("use enchant_dict_is_added() instead"), 1); diff --git a/ext/fileinfo/fileinfo_arginfo.h b/ext/fileinfo/fileinfo_arginfo.h index ac6ba0f591f98..7dd916ae14ba0 100644 --- a/ext/fileinfo/fileinfo_arginfo.h +++ b/ext/fileinfo/fileinfo_arginfo.h @@ -98,7 +98,7 @@ static void register_fileinfo_symbols(int module_number) REGISTER_LONG_CONSTANT("FILEINFO_EXTENSION", MAGIC_EXTENSION, CONST_PERSISTENT); - zend_attribute *attribute_Deprecated_func_finfo_close_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "finfo_close", sizeof("finfo_close") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_finfo_close_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "finfo_close", sizeof("finfo_close") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_finfo_close_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_5)); attribute_Deprecated_func_finfo_close_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_finfo_close_0_arg1_str = zend_string_init("as finfo objects are freed automatically", strlen("as finfo objects are freed automatically"), 1); diff --git a/ext/ftp/ftp_arginfo.h b/ext/ftp/ftp_arginfo.h index 77bc47df03f69..94dcfe5a5e58d 100644 --- a/ext/ftp/ftp_arginfo.h +++ b/ext/ftp/ftp_arginfo.h @@ -288,7 +288,7 @@ static void register_ftp_symbols(int module_number) REGISTER_LONG_CONSTANT("FTP_MOREDATA", PHP_FTP_MOREDATA, CONST_PERSISTENT); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "ftp_login", sizeof("ftp_login") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "ftp_login", sizeof("ftp_login") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); } static zend_class_entry *register_class_FTP_Connection(void) diff --git a/ext/gd/gd_arginfo.h b/ext/gd/gd_arginfo.h index 87cbfa54b945d..5748428e3dadd 100644 --- a/ext/gd/gd_arginfo.h +++ b/ext/gd/gd_arginfo.h @@ -925,7 +925,7 @@ static void register_gd_symbols(int module_number) #endif - zend_attribute *attribute_Deprecated_func_imagedestroy_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "imagedestroy", sizeof("imagedestroy") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_imagedestroy_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "imagedestroy", sizeof("imagedestroy") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_imagedestroy_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_5)); attribute_Deprecated_func_imagedestroy_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_imagedestroy_0_arg1_str = zend_string_init("as it has no effect since PHP 8.0", strlen("as it has no effect since PHP 8.0"), 1); diff --git a/ext/hash/hash_arginfo.h b/ext/hash/hash_arginfo.h index 0fb4407221af4..c3b3f798509d7 100644 --- a/ext/hash/hash_arginfo.h +++ b/ext/hash/hash_arginfo.h @@ -193,38 +193,38 @@ static void register_hash_symbols(int module_number) REGISTER_LONG_CONSTANT("HASH_HMAC", PHP_HASH_HMAC, CONST_PERSISTENT); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "hash_hmac", sizeof("hash_hmac") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "hash_hmac", sizeof("hash_hmac") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "hash_hmac_file", sizeof("hash_hmac_file") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "hash_hmac_file", sizeof("hash_hmac_file") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "hash_init", sizeof("hash_init") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "hash_init", sizeof("hash_init") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "hash_pbkdf2", sizeof("hash_pbkdf2") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "hash_pbkdf2", sizeof("hash_pbkdf2") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "hash_equals", sizeof("hash_equals") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "hash_equals", sizeof("hash_equals") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "hash_equals", sizeof("hash_equals") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "hash_equals", sizeof("hash_equals") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "hash_hkdf", sizeof("hash_hkdf") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "hash_hkdf", sizeof("hash_hkdf") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); #if defined(PHP_MHASH_BC) - zend_attribute *attribute_Deprecated_func_mhash_get_block_size_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "mhash_get_block_size", sizeof("mhash_get_block_size") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 1); + zend_attribute *attribute_Deprecated_func_mhash_get_block_size_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "mhash_get_block_size", sizeof("mhash_get_block_size") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 1); ZVAL_STR(&attribute_Deprecated_func_mhash_get_block_size_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_1)); attribute_Deprecated_func_mhash_get_block_size_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); - zend_attribute *attribute_Deprecated_func_mhash_get_hash_name_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "mhash_get_hash_name", sizeof("mhash_get_hash_name") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 1); + zend_attribute *attribute_Deprecated_func_mhash_get_hash_name_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "mhash_get_hash_name", sizeof("mhash_get_hash_name") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 1); ZVAL_STR(&attribute_Deprecated_func_mhash_get_hash_name_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_1)); attribute_Deprecated_func_mhash_get_hash_name_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); - zend_attribute *attribute_Deprecated_func_mhash_keygen_s2k_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "mhash_keygen_s2k", sizeof("mhash_keygen_s2k") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 1); + zend_attribute *attribute_Deprecated_func_mhash_keygen_s2k_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "mhash_keygen_s2k", sizeof("mhash_keygen_s2k") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 1); ZVAL_STR(&attribute_Deprecated_func_mhash_keygen_s2k_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_1)); attribute_Deprecated_func_mhash_keygen_s2k_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); - zend_attribute *attribute_Deprecated_func_mhash_count_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "mhash_count", sizeof("mhash_count") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 1); + zend_attribute *attribute_Deprecated_func_mhash_count_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "mhash_count", sizeof("mhash_count") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 1); ZVAL_STR(&attribute_Deprecated_func_mhash_count_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_1)); attribute_Deprecated_func_mhash_count_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); - zend_attribute *attribute_Deprecated_func_mhash_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "mhash", sizeof("mhash") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 1); + zend_attribute *attribute_Deprecated_func_mhash_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "mhash", sizeof("mhash") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 1); ZVAL_STR(&attribute_Deprecated_func_mhash_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_1)); attribute_Deprecated_func_mhash_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); #endif diff --git a/ext/ldap/ldap_arginfo.h b/ext/ldap/ldap_arginfo.h index 25aa03343ace0..0e2c51db8827f 100644 --- a/ext/ldap/ldap_arginfo.h +++ b/ext/ldap/ldap_arginfo.h @@ -709,39 +709,39 @@ static void register_ldap_symbols(int module_number) #if defined(HAVE_ORALDAP) - zend_attribute *attribute_Deprecated_func_ldap_connect_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "ldap_connect", sizeof("ldap_connect") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_ldap_connect_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "ldap_connect", sizeof("ldap_connect") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_ldap_connect_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_5)); attribute_Deprecated_func_ldap_connect_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_ldap_connect_0_arg1_str = zend_string_init("as it is broken since PHP 8.0", strlen("as it is broken since PHP 8.0"), 1); ZVAL_STR(&attribute_Deprecated_func_ldap_connect_0->args[1].value, attribute_Deprecated_func_ldap_connect_0_arg1_str); attribute_Deprecated_func_ldap_connect_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "ldap_connect", sizeof("ldap_connect") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "ldap_connect", sizeof("ldap_connect") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); #endif #if defined(HAVE_ORALDAP) && defined(LDAP_API_FEATURE_X_OPENLDAP) - zend_attribute *attribute_Deprecated_func_ldap_connect_wallet_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "ldap_connect_wallet", sizeof("ldap_connect_wallet") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_ldap_connect_wallet_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "ldap_connect_wallet", sizeof("ldap_connect_wallet") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_ldap_connect_wallet_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_5)); attribute_Deprecated_func_ldap_connect_wallet_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_ldap_connect_wallet_0_arg1_str = zend_string_init("as it is broken since PHP 8.0", strlen("as it is broken since PHP 8.0"), 1); ZVAL_STR(&attribute_Deprecated_func_ldap_connect_wallet_0->args[1].value, attribute_Deprecated_func_ldap_connect_wallet_0_arg1_str); attribute_Deprecated_func_ldap_connect_wallet_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "ldap_connect_wallet", sizeof("ldap_connect_wallet") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "ldap_connect_wallet", sizeof("ldap_connect_wallet") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); #endif - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "ldap_bind", sizeof("ldap_bind") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "ldap_bind", sizeof("ldap_bind") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "ldap_bind_ext", sizeof("ldap_bind_ext") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "ldap_bind_ext", sizeof("ldap_bind_ext") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); #if defined(HAVE_LDAP_SASL) - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "ldap_sasl_bind", sizeof("ldap_sasl_bind") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "ldap_sasl_bind", sizeof("ldap_sasl_bind") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); #endif #if defined(HAVE_LDAP_PASSWD) - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "ldap_exop_passwd", sizeof("ldap_exop_passwd") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "ldap_exop_passwd", sizeof("ldap_exop_passwd") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "ldap_exop_passwd", sizeof("ldap_exop_passwd") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "ldap_exop_passwd", sizeof("ldap_exop_passwd") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); #endif #if defined(HAVE_ORALDAP) diff --git a/ext/libxml/libxml_arginfo.h b/ext/libxml/libxml_arginfo.h index 9e3e07c83e503..6ff03381dd06c 100644 --- a/ext/libxml/libxml_arginfo.h +++ b/ext/libxml/libxml_arginfo.h @@ -87,7 +87,7 @@ static void register_libxml_symbols(int module_number) REGISTER_LONG_CONSTANT("LIBXML_ERR_FATAL", XML_ERR_FATAL, CONST_PERSISTENT); - zend_attribute *attribute_Deprecated_func_libxml_disable_entity_loader_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "libxml_disable_entity_loader", sizeof("libxml_disable_entity_loader") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_libxml_disable_entity_loader_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "libxml_disable_entity_loader", sizeof("libxml_disable_entity_loader") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_libxml_disable_entity_loader_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_0)); attribute_Deprecated_func_libxml_disable_entity_loader_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_libxml_disable_entity_loader_0_arg1_str = zend_string_init("as external entity loading is disabled by default", strlen("as external entity loading is disabled by default"), 1); diff --git a/ext/mysqli/mysqli_arginfo.h b/ext/mysqli/mysqli_arginfo.h index 789464a762538..bd69339aa095d 100644 --- a/ext/mysqli/mysqli_arginfo.h +++ b/ext/mysqli/mysqli_arginfo.h @@ -1146,34 +1146,34 @@ static void register_mysqli_symbols(int module_number) zend_constant *const_MYSQLI_IS_MARIADB = REGISTER_BOOL_CONSTANT("MYSQLI_IS_MARIADB", false, CONST_PERSISTENT | CONST_DEPRECATED); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "mysqli_change_user", sizeof("mysqli_change_user") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "mysqli_change_user", sizeof("mysqli_change_user") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "mysqli_connect", sizeof("mysqli_connect") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "mysqli_connect", sizeof("mysqli_connect") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_attribute *attribute_Deprecated_func_mysqli_execute_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "mysqli_execute", sizeof("mysqli_execute") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_mysqli_execute_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "mysqli_execute", sizeof("mysqli_execute") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_mysqli_execute_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_5)); attribute_Deprecated_func_mysqli_execute_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_mysqli_execute_0_arg1_str = zend_string_init("use mysqli_stmt_execute() instead", strlen("use mysqli_stmt_execute() instead"), 1); ZVAL_STR(&attribute_Deprecated_func_mysqli_execute_0->args[1].value, attribute_Deprecated_func_mysqli_execute_0_arg1_str); attribute_Deprecated_func_mysqli_execute_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_attribute *attribute_Deprecated_func_mysqli_kill_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "mysqli_kill", sizeof("mysqli_kill") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_mysqli_kill_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "mysqli_kill", sizeof("mysqli_kill") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_mysqli_kill_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_4)); attribute_Deprecated_func_mysqli_kill_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_mysqli_kill_0_arg1_str = zend_string_init("use KILL CONNECTION/QUERY SQL statement instead", strlen("use KILL CONNECTION/QUERY SQL statement instead"), 1); ZVAL_STR(&attribute_Deprecated_func_mysqli_kill_0->args[1].value, attribute_Deprecated_func_mysqli_kill_0_arg1_str); attribute_Deprecated_func_mysqli_kill_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_attribute *attribute_Deprecated_func_mysqli_ping_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "mysqli_ping", sizeof("mysqli_ping") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_mysqli_ping_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "mysqli_ping", sizeof("mysqli_ping") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_mysqli_ping_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_4)); attribute_Deprecated_func_mysqli_ping_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_mysqli_ping_0_arg1_str = zend_string_init("because the reconnect feature has been removed in PHP 8.2 and this function is now redundant", strlen("because the reconnect feature has been removed in PHP 8.2 and this function is now redundant"), 1); ZVAL_STR(&attribute_Deprecated_func_mysqli_ping_0->args[1].value, attribute_Deprecated_func_mysqli_ping_0_arg1_str); attribute_Deprecated_func_mysqli_ping_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "mysqli_real_connect", sizeof("mysqli_real_connect") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "mysqli_real_connect", sizeof("mysqli_real_connect") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_attribute *attribute_Deprecated_func_mysqli_refresh_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "mysqli_refresh", sizeof("mysqli_refresh") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_mysqli_refresh_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "mysqli_refresh", sizeof("mysqli_refresh") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_mysqli_refresh_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_4)); attribute_Deprecated_func_mysqli_refresh_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_mysqli_refresh_0_arg1_str = zend_string_init("use FLUSH SQL statement instead", strlen("use FLUSH SQL statement instead"), 1); @@ -1443,43 +1443,43 @@ static zend_class_entry *register_class_mysqli(void) zend_string_release_ex(property_warning_count_name, true); - zend_add_parameter_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "__construct", sizeof("__construct") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(&class_entry->function_table, "__construct", sizeof("__construct") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "change_user", sizeof("change_user") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(&class_entry->function_table, "change_user", sizeof("change_user") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "connect", sizeof("connect") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(&class_entry->function_table, "connect", sizeof("connect") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_attribute *attribute_Deprecated_func_get_client_info_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "get_client_info", sizeof("get_client_info") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_get_client_info_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(&class_entry->function_table, "get_client_info", sizeof("get_client_info") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_get_client_info_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_1)); attribute_Deprecated_func_get_client_info_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_get_client_info_0_arg1_str = zend_string_init("use mysqli_get_client_info() instead", strlen("use mysqli_get_client_info() instead"), 1); ZVAL_STR(&attribute_Deprecated_func_get_client_info_0->args[1].value, attribute_Deprecated_func_get_client_info_0_arg1_str); attribute_Deprecated_func_get_client_info_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_attribute *attribute_Deprecated_func_init_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "init", sizeof("init") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_init_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(&class_entry->function_table, "init", sizeof("init") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_init_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_1)); attribute_Deprecated_func_init_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_init_0_arg1_str = zend_string_init("replace calls to parent::init() with parent::__construct()", strlen("replace calls to parent::init() with parent::__construct()"), 1); ZVAL_STR(&attribute_Deprecated_func_init_0->args[1].value, attribute_Deprecated_func_init_0_arg1_str); attribute_Deprecated_func_init_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_attribute *attribute_Deprecated_func_kill_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "kill", sizeof("kill") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_kill_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(&class_entry->function_table, "kill", sizeof("kill") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_kill_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_4)); attribute_Deprecated_func_kill_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_kill_0_arg1_str = zend_string_init("use KILL CONNECTION/QUERY SQL statement instead", strlen("use KILL CONNECTION/QUERY SQL statement instead"), 1); ZVAL_STR(&attribute_Deprecated_func_kill_0->args[1].value, attribute_Deprecated_func_kill_0_arg1_str); attribute_Deprecated_func_kill_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_attribute *attribute_Deprecated_func_ping_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "ping", sizeof("ping") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_ping_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(&class_entry->function_table, "ping", sizeof("ping") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_ping_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_4)); attribute_Deprecated_func_ping_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_ping_0_arg1_str = zend_string_init("because the reconnect feature has been removed in PHP 8.2 and this method is now redundant", strlen("because the reconnect feature has been removed in PHP 8.2 and this method is now redundant"), 1); ZVAL_STR(&attribute_Deprecated_func_ping_0->args[1].value, attribute_Deprecated_func_ping_0_arg1_str); attribute_Deprecated_func_ping_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_add_parameter_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "real_connect", sizeof("real_connect") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(&class_entry->function_table, "real_connect", sizeof("real_connect") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_attribute *attribute_Deprecated_func_refresh_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "refresh", sizeof("refresh") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_refresh_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(&class_entry->function_table, "refresh", sizeof("refresh") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_refresh_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_4)); attribute_Deprecated_func_refresh_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_refresh_0_arg1_str = zend_string_init("use FLUSH SQL statement instead", strlen("use FLUSH SQL statement instead"), 1); diff --git a/ext/odbc/odbc_arginfo.h b/ext/odbc/odbc_arginfo.h index 0298adf2c1c4f..55c4fc588f775 100644 --- a/ext/odbc/odbc_arginfo.h +++ b/ext/odbc/odbc_arginfo.h @@ -392,13 +392,13 @@ static void register_odbc_symbols(int module_number) REGISTER_LONG_CONSTANT("SQL_QUICK", SQL_QUICK, CONST_PERSISTENT); - zend_attribute *attribute_Deprecated_func_odbc_result_all_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "odbc_result_all", sizeof("odbc_result_all") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 1); + zend_attribute *attribute_Deprecated_func_odbc_result_all_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "odbc_result_all", sizeof("odbc_result_all") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 1); ZVAL_STR(&attribute_Deprecated_func_odbc_result_all_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_1)); attribute_Deprecated_func_odbc_result_all_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "odbc_connect", sizeof("odbc_connect") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "odbc_connect", sizeof("odbc_connect") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "odbc_pconnect", sizeof("odbc_pconnect") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "odbc_pconnect", sizeof("odbc_pconnect") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); } static zend_class_entry *register_class_Odbc_Connection(void) diff --git a/ext/openssl/openssl_arginfo.h b/ext/openssl/openssl_arginfo.h index 796582c185bb6..c8de49d120f66 100644 --- a/ext/openssl/openssl_arginfo.h +++ b/ext/openssl/openssl_arginfo.h @@ -646,108 +646,108 @@ static void register_openssl_symbols(int module_number) REGISTER_LONG_CONSTANT("OPENSSL_ENCODING_PEM", ENCODING_PEM, CONST_PERSISTENT); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "openssl_x509_check_private_key", sizeof("openssl_x509_check_private_key") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "openssl_x509_check_private_key", sizeof("openssl_x509_check_private_key") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_attribute *attribute_Deprecated_func_openssl_x509_free_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "openssl_x509_free", sizeof("openssl_x509_free") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_openssl_x509_free_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "openssl_x509_free", sizeof("openssl_x509_free") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_openssl_x509_free_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_0)); attribute_Deprecated_func_openssl_x509_free_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_openssl_x509_free_0_arg1_str = zend_string_init("as OpenSSLCertificate objects are freed automatically", strlen("as OpenSSLCertificate objects are freed automatically"), 1); ZVAL_STR(&attribute_Deprecated_func_openssl_x509_free_0->args[1].value, attribute_Deprecated_func_openssl_x509_free_0_arg1_str); attribute_Deprecated_func_openssl_x509_free_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "openssl_pkcs12_export_to_file", sizeof("openssl_pkcs12_export_to_file") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "openssl_pkcs12_export_to_file", sizeof("openssl_pkcs12_export_to_file") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "openssl_pkcs12_export_to_file", sizeof("openssl_pkcs12_export_to_file") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "openssl_pkcs12_export_to_file", sizeof("openssl_pkcs12_export_to_file") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "openssl_pkcs12_export", sizeof("openssl_pkcs12_export") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "openssl_pkcs12_export", sizeof("openssl_pkcs12_export") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "openssl_pkcs12_export", sizeof("openssl_pkcs12_export") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "openssl_pkcs12_export", sizeof("openssl_pkcs12_export") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "openssl_pkcs12_read", sizeof("openssl_pkcs12_read") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "openssl_pkcs12_read", sizeof("openssl_pkcs12_read") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "openssl_csr_sign", sizeof("openssl_csr_sign") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "openssl_csr_sign", sizeof("openssl_csr_sign") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "openssl_csr_new", sizeof("openssl_csr_new") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "openssl_csr_new", sizeof("openssl_csr_new") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "openssl_pkey_export_to_file", sizeof("openssl_pkey_export_to_file") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "openssl_pkey_export_to_file", sizeof("openssl_pkey_export_to_file") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "openssl_pkey_export_to_file", sizeof("openssl_pkey_export_to_file") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "openssl_pkey_export_to_file", sizeof("openssl_pkey_export_to_file") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "openssl_pkey_export", sizeof("openssl_pkey_export") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "openssl_pkey_export", sizeof("openssl_pkey_export") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "openssl_pkey_export", sizeof("openssl_pkey_export") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "openssl_pkey_export", sizeof("openssl_pkey_export") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_attribute *attribute_Deprecated_func_openssl_pkey_free_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "openssl_pkey_free", sizeof("openssl_pkey_free") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_openssl_pkey_free_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "openssl_pkey_free", sizeof("openssl_pkey_free") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_openssl_pkey_free_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_0)); attribute_Deprecated_func_openssl_pkey_free_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_openssl_pkey_free_0_arg1_str = zend_string_init("as OpenSSLAsymmetricKey objects are freed automatically", strlen("as OpenSSLAsymmetricKey objects are freed automatically"), 1); ZVAL_STR(&attribute_Deprecated_func_openssl_pkey_free_0->args[1].value, attribute_Deprecated_func_openssl_pkey_free_0_arg1_str); attribute_Deprecated_func_openssl_pkey_free_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_attribute *attribute_Deprecated_func_openssl_free_key_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "openssl_free_key", sizeof("openssl_free_key") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_openssl_free_key_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "openssl_free_key", sizeof("openssl_free_key") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_openssl_free_key_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_0)); attribute_Deprecated_func_openssl_free_key_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); ZVAL_STR_COPY(&attribute_Deprecated_func_openssl_free_key_0->args[1].value, attribute_Deprecated_func_openssl_pkey_free_0_arg1_str); attribute_Deprecated_func_openssl_free_key_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "openssl_pkey_get_private", sizeof("openssl_pkey_get_private") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "openssl_pkey_get_private", sizeof("openssl_pkey_get_private") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "openssl_pkey_get_private", sizeof("openssl_pkey_get_private") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "openssl_pkey_get_private", sizeof("openssl_pkey_get_private") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "openssl_get_privatekey", sizeof("openssl_get_privatekey") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "openssl_get_privatekey", sizeof("openssl_get_privatekey") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "openssl_get_privatekey", sizeof("openssl_get_privatekey") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "openssl_get_privatekey", sizeof("openssl_get_privatekey") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "openssl_pbkdf2", sizeof("openssl_pbkdf2") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "openssl_pbkdf2", sizeof("openssl_pbkdf2") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "openssl_pkcs7_sign", sizeof("openssl_pkcs7_sign") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "openssl_pkcs7_sign", sizeof("openssl_pkcs7_sign") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "openssl_pkcs7_decrypt", sizeof("openssl_pkcs7_decrypt") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "openssl_pkcs7_decrypt", sizeof("openssl_pkcs7_decrypt") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "openssl_pkcs7_decrypt", sizeof("openssl_pkcs7_decrypt") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "openssl_pkcs7_decrypt", sizeof("openssl_pkcs7_decrypt") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "openssl_cms_sign", sizeof("openssl_cms_sign") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "openssl_cms_sign", sizeof("openssl_cms_sign") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "openssl_cms_decrypt", sizeof("openssl_cms_decrypt") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "openssl_cms_decrypt", sizeof("openssl_cms_decrypt") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "openssl_cms_decrypt", sizeof("openssl_cms_decrypt") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "openssl_cms_decrypt", sizeof("openssl_cms_decrypt") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "openssl_private_encrypt", sizeof("openssl_private_encrypt") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "openssl_private_encrypt", sizeof("openssl_private_encrypt") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "openssl_private_encrypt", sizeof("openssl_private_encrypt") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "openssl_private_encrypt", sizeof("openssl_private_encrypt") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "openssl_private_decrypt", sizeof("openssl_private_decrypt") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "openssl_private_decrypt", sizeof("openssl_private_decrypt") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "openssl_private_decrypt", sizeof("openssl_private_decrypt") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "openssl_private_decrypt", sizeof("openssl_private_decrypt") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "openssl_public_encrypt", sizeof("openssl_public_encrypt") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "openssl_public_encrypt", sizeof("openssl_public_encrypt") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "openssl_public_decrypt", sizeof("openssl_public_decrypt") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "openssl_public_decrypt", sizeof("openssl_public_decrypt") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "openssl_sign", sizeof("openssl_sign") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "openssl_sign", sizeof("openssl_sign") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "openssl_seal", sizeof("openssl_seal") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "openssl_seal", sizeof("openssl_seal") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "openssl_open", sizeof("openssl_open") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "openssl_open", sizeof("openssl_open") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "openssl_open", sizeof("openssl_open") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "openssl_open", sizeof("openssl_open") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "openssl_encrypt", sizeof("openssl_encrypt") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "openssl_encrypt", sizeof("openssl_encrypt") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "openssl_encrypt", sizeof("openssl_encrypt") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "openssl_encrypt", sizeof("openssl_encrypt") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "openssl_decrypt", sizeof("openssl_decrypt") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "openssl_decrypt", sizeof("openssl_decrypt") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "openssl_dh_compute_key", sizeof("openssl_dh_compute_key") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "openssl_dh_compute_key", sizeof("openssl_dh_compute_key") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "openssl_pkey_derive", sizeof("openssl_pkey_derive") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "openssl_pkey_derive", sizeof("openssl_pkey_derive") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "openssl_spki_new", sizeof("openssl_spki_new") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "openssl_spki_new", sizeof("openssl_spki_new") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); #if defined(HAVE_OPENSSL_ARGON2) - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "openssl_password_hash", sizeof("openssl_password_hash") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "openssl_password_hash", sizeof("openssl_password_hash") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "openssl_password_verify", sizeof("openssl_password_verify") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "openssl_password_verify", sizeof("openssl_password_verify") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); #endif } diff --git a/ext/pdo/pdo_dbh_arginfo.h b/ext/pdo/pdo_dbh_arginfo.h index cc622a52e2688..58a80db47dc8a 100644 --- a/ext/pdo/pdo_dbh_arginfo.h +++ b/ext/pdo/pdo_dbh_arginfo.h @@ -561,9 +561,9 @@ static zend_class_entry *register_class_PDO(void) zend_string_release_ex(const_CURSOR_SCROLL_name, true); - zend_add_parameter_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "__construct", sizeof("__construct") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(&class_entry->function_table, "__construct", sizeof("__construct") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "connect", sizeof("connect") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(&class_entry->function_table, "connect", sizeof("connect") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); return class_entry; } diff --git a/ext/pgsql/pgsql_arginfo.h b/ext/pgsql/pgsql_arginfo.h index 2d9eec944356e..0ccc1d26601c8 100644 --- a/ext/pgsql/pgsql_arginfo.h +++ b/ext/pgsql/pgsql_arginfo.h @@ -864,175 +864,175 @@ static void register_pgsql_symbols(int module_number) REGISTER_LONG_CONSTANT("PGSQL_SHOW_CONTEXT_ALWAYS", PQSHOW_CONTEXT_ALWAYS, CONST_PERSISTENT); - zend_attribute *attribute_Deprecated_func_pg_errormessage_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "pg_errormessage", sizeof("pg_errormessage") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_pg_errormessage_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "pg_errormessage", sizeof("pg_errormessage") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_pg_errormessage_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_0)); attribute_Deprecated_func_pg_errormessage_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_pg_errormessage_0_arg1_str = zend_string_init("use pg_last_error() instead", strlen("use pg_last_error() instead"), 1); ZVAL_STR(&attribute_Deprecated_func_pg_errormessage_0->args[1].value, attribute_Deprecated_func_pg_errormessage_0_arg1_str); attribute_Deprecated_func_pg_errormessage_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_attribute *attribute_Deprecated_func_pg_numrows_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "pg_numrows", sizeof("pg_numrows") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_pg_numrows_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "pg_numrows", sizeof("pg_numrows") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_pg_numrows_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_0)); attribute_Deprecated_func_pg_numrows_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_pg_numrows_0_arg1_str = zend_string_init("use pg_num_rows() instead", strlen("use pg_num_rows() instead"), 1); ZVAL_STR(&attribute_Deprecated_func_pg_numrows_0->args[1].value, attribute_Deprecated_func_pg_numrows_0_arg1_str); attribute_Deprecated_func_pg_numrows_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_attribute *attribute_Deprecated_func_pg_numfields_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "pg_numfields", sizeof("pg_numfields") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_pg_numfields_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "pg_numfields", sizeof("pg_numfields") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_pg_numfields_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_0)); attribute_Deprecated_func_pg_numfields_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_pg_numfields_0_arg1_str = zend_string_init("use pg_num_fields() instead", strlen("use pg_num_fields() instead"), 1); ZVAL_STR(&attribute_Deprecated_func_pg_numfields_0->args[1].value, attribute_Deprecated_func_pg_numfields_0_arg1_str); attribute_Deprecated_func_pg_numfields_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_attribute *attribute_Deprecated_func_pg_cmdtuples_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "pg_cmdtuples", sizeof("pg_cmdtuples") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_pg_cmdtuples_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "pg_cmdtuples", sizeof("pg_cmdtuples") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_pg_cmdtuples_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_0)); attribute_Deprecated_func_pg_cmdtuples_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_pg_cmdtuples_0_arg1_str = zend_string_init("use pg_affected_rows() instead", strlen("use pg_affected_rows() instead"), 1); ZVAL_STR(&attribute_Deprecated_func_pg_cmdtuples_0->args[1].value, attribute_Deprecated_func_pg_cmdtuples_0_arg1_str); attribute_Deprecated_func_pg_cmdtuples_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_attribute *attribute_Deprecated_func_pg_fieldname_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "pg_fieldname", sizeof("pg_fieldname") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_pg_fieldname_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "pg_fieldname", sizeof("pg_fieldname") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_pg_fieldname_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_0)); attribute_Deprecated_func_pg_fieldname_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_pg_fieldname_0_arg1_str = zend_string_init("use pg_field_name() instead", strlen("use pg_field_name() instead"), 1); ZVAL_STR(&attribute_Deprecated_func_pg_fieldname_0->args[1].value, attribute_Deprecated_func_pg_fieldname_0_arg1_str); attribute_Deprecated_func_pg_fieldname_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_attribute *attribute_Deprecated_func_pg_fieldsize_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "pg_fieldsize", sizeof("pg_fieldsize") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_pg_fieldsize_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "pg_fieldsize", sizeof("pg_fieldsize") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_pg_fieldsize_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_0)); attribute_Deprecated_func_pg_fieldsize_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_pg_fieldsize_0_arg1_str = zend_string_init("use pg_field_size() instead", strlen("use pg_field_size() instead"), 1); ZVAL_STR(&attribute_Deprecated_func_pg_fieldsize_0->args[1].value, attribute_Deprecated_func_pg_fieldsize_0_arg1_str); attribute_Deprecated_func_pg_fieldsize_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_attribute *attribute_Deprecated_func_pg_fieldtype_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "pg_fieldtype", sizeof("pg_fieldtype") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_pg_fieldtype_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "pg_fieldtype", sizeof("pg_fieldtype") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_pg_fieldtype_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_0)); attribute_Deprecated_func_pg_fieldtype_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_pg_fieldtype_0_arg1_str = zend_string_init("use pg_field_type() instead", strlen("use pg_field_type() instead"), 1); ZVAL_STR(&attribute_Deprecated_func_pg_fieldtype_0->args[1].value, attribute_Deprecated_func_pg_fieldtype_0_arg1_str); attribute_Deprecated_func_pg_fieldtype_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_attribute *attribute_Deprecated_func_pg_fieldnum_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "pg_fieldnum", sizeof("pg_fieldnum") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_pg_fieldnum_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "pg_fieldnum", sizeof("pg_fieldnum") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_pg_fieldnum_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_0)); attribute_Deprecated_func_pg_fieldnum_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_pg_fieldnum_0_arg1_str = zend_string_init("use pg_field_num() instead", strlen("use pg_field_num() instead"), 1); ZVAL_STR(&attribute_Deprecated_func_pg_fieldnum_0->args[1].value, attribute_Deprecated_func_pg_fieldnum_0_arg1_str); attribute_Deprecated_func_pg_fieldnum_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_attribute *attribute_Deprecated_func_pg_result_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "pg_result", sizeof("pg_result") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_pg_result_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "pg_result", sizeof("pg_result") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_pg_result_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_0)); attribute_Deprecated_func_pg_result_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_pg_result_0_arg1_str = zend_string_init("use pg_fetch_result() instead", strlen("use pg_fetch_result() instead"), 1); ZVAL_STR(&attribute_Deprecated_func_pg_result_0->args[1].value, attribute_Deprecated_func_pg_result_0_arg1_str); attribute_Deprecated_func_pg_result_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_attribute *attribute_Deprecated_func_pg_fieldprtlen_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "pg_fieldprtlen", sizeof("pg_fieldprtlen") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_pg_fieldprtlen_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "pg_fieldprtlen", sizeof("pg_fieldprtlen") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_pg_fieldprtlen_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_0)); attribute_Deprecated_func_pg_fieldprtlen_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_pg_fieldprtlen_0_arg1_str = zend_string_init("use pg_field_prtlen() instead", strlen("use pg_field_prtlen() instead"), 1); ZVAL_STR(&attribute_Deprecated_func_pg_fieldprtlen_0->args[1].value, attribute_Deprecated_func_pg_fieldprtlen_0_arg1_str); attribute_Deprecated_func_pg_fieldprtlen_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_attribute *attribute_Deprecated_func_pg_fieldisnull_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "pg_fieldisnull", sizeof("pg_fieldisnull") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_pg_fieldisnull_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "pg_fieldisnull", sizeof("pg_fieldisnull") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_pg_fieldisnull_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_0)); attribute_Deprecated_func_pg_fieldisnull_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_pg_fieldisnull_0_arg1_str = zend_string_init("use pg_field_is_null() instead", strlen("use pg_field_is_null() instead"), 1); ZVAL_STR(&attribute_Deprecated_func_pg_fieldisnull_0->args[1].value, attribute_Deprecated_func_pg_fieldisnull_0_arg1_str); attribute_Deprecated_func_pg_fieldisnull_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_attribute *attribute_Deprecated_func_pg_freeresult_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "pg_freeresult", sizeof("pg_freeresult") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_pg_freeresult_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "pg_freeresult", sizeof("pg_freeresult") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_pg_freeresult_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_0)); attribute_Deprecated_func_pg_freeresult_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_pg_freeresult_0_arg1_str = zend_string_init("use pg_free_result() instead", strlen("use pg_free_result() instead"), 1); ZVAL_STR(&attribute_Deprecated_func_pg_freeresult_0->args[1].value, attribute_Deprecated_func_pg_freeresult_0_arg1_str); attribute_Deprecated_func_pg_freeresult_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_attribute *attribute_Deprecated_func_pg_getlastoid_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "pg_getlastoid", sizeof("pg_getlastoid") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_pg_getlastoid_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "pg_getlastoid", sizeof("pg_getlastoid") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_pg_getlastoid_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_0)); attribute_Deprecated_func_pg_getlastoid_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_pg_getlastoid_0_arg1_str = zend_string_init("use pg_last_oid() instead", strlen("use pg_last_oid() instead"), 1); ZVAL_STR(&attribute_Deprecated_func_pg_getlastoid_0->args[1].value, attribute_Deprecated_func_pg_getlastoid_0_arg1_str); attribute_Deprecated_func_pg_getlastoid_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_attribute *attribute_Deprecated_func_pg_locreate_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "pg_locreate", sizeof("pg_locreate") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_pg_locreate_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "pg_locreate", sizeof("pg_locreate") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_pg_locreate_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_0)); attribute_Deprecated_func_pg_locreate_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_pg_locreate_0_arg1_str = zend_string_init("use pg_lo_create() instead", strlen("use pg_lo_create() instead"), 1); ZVAL_STR(&attribute_Deprecated_func_pg_locreate_0->args[1].value, attribute_Deprecated_func_pg_locreate_0_arg1_str); attribute_Deprecated_func_pg_locreate_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_attribute *attribute_Deprecated_func_pg_lounlink_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "pg_lounlink", sizeof("pg_lounlink") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_pg_lounlink_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "pg_lounlink", sizeof("pg_lounlink") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_pg_lounlink_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_0)); attribute_Deprecated_func_pg_lounlink_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_pg_lounlink_0_arg1_str = zend_string_init("use pg_lo_unlink() instead", strlen("use pg_lo_unlink() instead"), 1); ZVAL_STR(&attribute_Deprecated_func_pg_lounlink_0->args[1].value, attribute_Deprecated_func_pg_lounlink_0_arg1_str); attribute_Deprecated_func_pg_lounlink_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_attribute *attribute_Deprecated_func_pg_loopen_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "pg_loopen", sizeof("pg_loopen") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_pg_loopen_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "pg_loopen", sizeof("pg_loopen") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_pg_loopen_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_0)); attribute_Deprecated_func_pg_loopen_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_pg_loopen_0_arg1_str = zend_string_init("use pg_lo_open() instead", strlen("use pg_lo_open() instead"), 1); ZVAL_STR(&attribute_Deprecated_func_pg_loopen_0->args[1].value, attribute_Deprecated_func_pg_loopen_0_arg1_str); attribute_Deprecated_func_pg_loopen_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_attribute *attribute_Deprecated_func_pg_loclose_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "pg_loclose", sizeof("pg_loclose") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_pg_loclose_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "pg_loclose", sizeof("pg_loclose") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_pg_loclose_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_0)); attribute_Deprecated_func_pg_loclose_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_pg_loclose_0_arg1_str = zend_string_init("use pg_lo_close() instead", strlen("use pg_lo_close() instead"), 1); ZVAL_STR(&attribute_Deprecated_func_pg_loclose_0->args[1].value, attribute_Deprecated_func_pg_loclose_0_arg1_str); attribute_Deprecated_func_pg_loclose_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_attribute *attribute_Deprecated_func_pg_loread_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "pg_loread", sizeof("pg_loread") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_pg_loread_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "pg_loread", sizeof("pg_loread") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_pg_loread_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_0)); attribute_Deprecated_func_pg_loread_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_pg_loread_0_arg1_str = zend_string_init("use pg_lo_read() instead", strlen("use pg_lo_read() instead"), 1); ZVAL_STR(&attribute_Deprecated_func_pg_loread_0->args[1].value, attribute_Deprecated_func_pg_loread_0_arg1_str); attribute_Deprecated_func_pg_loread_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_attribute *attribute_Deprecated_func_pg_lowrite_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "pg_lowrite", sizeof("pg_lowrite") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_pg_lowrite_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "pg_lowrite", sizeof("pg_lowrite") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_pg_lowrite_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_0)); attribute_Deprecated_func_pg_lowrite_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_pg_lowrite_0_arg1_str = zend_string_init("use pg_lo_write() instead", strlen("use pg_lo_write() instead"), 1); ZVAL_STR(&attribute_Deprecated_func_pg_lowrite_0->args[1].value, attribute_Deprecated_func_pg_lowrite_0_arg1_str); attribute_Deprecated_func_pg_lowrite_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_attribute *attribute_Deprecated_func_pg_loreadall_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "pg_loreadall", sizeof("pg_loreadall") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_pg_loreadall_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "pg_loreadall", sizeof("pg_loreadall") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_pg_loreadall_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_0)); attribute_Deprecated_func_pg_loreadall_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_pg_loreadall_0_arg1_str = zend_string_init("use pg_lo_read_all() instead", strlen("use pg_lo_read_all() instead"), 1); ZVAL_STR(&attribute_Deprecated_func_pg_loreadall_0->args[1].value, attribute_Deprecated_func_pg_loreadall_0_arg1_str); attribute_Deprecated_func_pg_loreadall_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_attribute *attribute_Deprecated_func_pg_loimport_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "pg_loimport", sizeof("pg_loimport") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_pg_loimport_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "pg_loimport", sizeof("pg_loimport") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_pg_loimport_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_0)); attribute_Deprecated_func_pg_loimport_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_pg_loimport_0_arg1_str = zend_string_init("use pg_lo_import() instead", strlen("use pg_lo_import() instead"), 1); ZVAL_STR(&attribute_Deprecated_func_pg_loimport_0->args[1].value, attribute_Deprecated_func_pg_loimport_0_arg1_str); attribute_Deprecated_func_pg_loimport_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_attribute *attribute_Deprecated_func_pg_loexport_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "pg_loexport", sizeof("pg_loexport") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_pg_loexport_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "pg_loexport", sizeof("pg_loexport") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_pg_loexport_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_0)); attribute_Deprecated_func_pg_loexport_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_pg_loexport_0_arg1_str = zend_string_init("use pg_lo_export() instead", strlen("use pg_lo_export() instead"), 1); ZVAL_STR(&attribute_Deprecated_func_pg_loexport_0->args[1].value, attribute_Deprecated_func_pg_loexport_0_arg1_str); attribute_Deprecated_func_pg_loexport_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_attribute *attribute_Deprecated_func_pg_setclientencoding_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "pg_setclientencoding", sizeof("pg_setclientencoding") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_pg_setclientencoding_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "pg_setclientencoding", sizeof("pg_setclientencoding") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_pg_setclientencoding_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_0)); attribute_Deprecated_func_pg_setclientencoding_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_pg_setclientencoding_0_arg1_str = zend_string_init("use pg_set_client_encoding() instead", strlen("use pg_set_client_encoding() instead"), 1); ZVAL_STR(&attribute_Deprecated_func_pg_setclientencoding_0->args[1].value, attribute_Deprecated_func_pg_setclientencoding_0_arg1_str); attribute_Deprecated_func_pg_setclientencoding_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_attribute *attribute_Deprecated_func_pg_clientencoding_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "pg_clientencoding", sizeof("pg_clientencoding") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_pg_clientencoding_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "pg_clientencoding", sizeof("pg_clientencoding") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_pg_clientencoding_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_0)); attribute_Deprecated_func_pg_clientencoding_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_pg_clientencoding_0_arg1_str = zend_string_init("use pg_client_encoding() instead", strlen("use pg_client_encoding() instead"), 1); ZVAL_STR(&attribute_Deprecated_func_pg_clientencoding_0->args[1].value, attribute_Deprecated_func_pg_clientencoding_0_arg1_str); attribute_Deprecated_func_pg_clientencoding_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "pg_change_password", sizeof("pg_change_password") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "pg_change_password", sizeof("pg_change_password") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); zend_attribute *attribute_Deprecated_const_PGSQL_LIBPQ_VERSION_STR_0 = zend_add_global_constant_attribute(const_PGSQL_LIBPQ_VERSION_STR, ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_const_PGSQL_LIBPQ_VERSION_STR_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_0)); diff --git a/ext/random/random_arginfo.h b/ext/random/random_arginfo.h index 94c024b122369..33c2d5cc5c18c 100644 --- a/ext/random/random_arginfo.h +++ b/ext/random/random_arginfo.h @@ -229,7 +229,7 @@ static void register_random_symbols(int module_number) zend_constant *const_MT_RAND_PHP = REGISTER_LONG_CONSTANT("MT_RAND_PHP", MT_RAND_PHP, CONST_PERSISTENT | CONST_DEPRECATED); - zend_attribute *attribute_Deprecated_func_lcg_value_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "lcg_value", sizeof("lcg_value") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_lcg_value_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "lcg_value", sizeof("lcg_value") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_lcg_value_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_4)); attribute_Deprecated_func_lcg_value_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_lcg_value_0_arg1_str = zend_string_init("use \\Random\\Randomizer::getFloat() instead", strlen("use \\Random\\Randomizer::getFloat() instead"), 1); diff --git a/ext/reflection/php_reflection_arginfo.h b/ext/reflection/php_reflection_arginfo.h index d1f1ffed0cfb6..34c931e6e42ea 100644 --- a/ext/reflection/php_reflection_arginfo.h +++ b/ext/reflection/php_reflection_arginfo.h @@ -1426,7 +1426,7 @@ static zend_class_entry *register_class_ReflectionFunction(zend_class_entry *cla zend_string_release_ex(const_IS_DEPRECATED_name, true); - zend_attribute *attribute_Deprecated_func_isdisabled_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "isdisabled", sizeof("isdisabled") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_isdisabled_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(&class_entry->function_table, "isdisabled", sizeof("isdisabled") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_isdisabled_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_0)); attribute_Deprecated_func_isdisabled_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_isdisabled_0_arg1_str = zend_string_init("as ReflectionFunction can no longer be constructed for disabled functions", strlen("as ReflectionFunction can no longer be constructed for disabled functions"), 1); @@ -1494,7 +1494,7 @@ static zend_class_entry *register_class_ReflectionMethod(zend_class_entry *class zend_declare_typed_property(class_entry, ZSTR_KNOWN(ZEND_STR_CLASS), &property_class_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_STRING)); - zend_attribute *attribute_Deprecated_func_setaccessible_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "setaccessible", sizeof("setaccessible") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_setaccessible_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(&class_entry->function_table, "setaccessible", sizeof("setaccessible") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_setaccessible_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_5)); attribute_Deprecated_func_setaccessible_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_setaccessible_0_arg1_str = zend_string_init("as it has no effect", strlen("as it has no effect"), 1); @@ -1659,7 +1659,7 @@ static zend_class_entry *register_class_ReflectionProperty(zend_class_entry *cla zend_declare_typed_property(class_entry, ZSTR_KNOWN(ZEND_STR_CLASS), &property_class_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_STRING)); - zend_attribute *attribute_Deprecated_func_setaccessible_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "setaccessible", sizeof("setaccessible") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_setaccessible_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(&class_entry->function_table, "setaccessible", sizeof("setaccessible") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_setaccessible_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_5)); attribute_Deprecated_func_setaccessible_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_setaccessible_0_arg1_str = zend_string_init("as it has no effect", strlen("as it has no effect"), 1); @@ -1725,20 +1725,20 @@ static zend_class_entry *register_class_ReflectionParameter(zend_class_entry *cl zend_declare_typed_property(class_entry, ZSTR_KNOWN(ZEND_STR_NAME), &property_name_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_STRING)); - zend_attribute *attribute_Deprecated_func_getclass_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "getclass", sizeof("getclass") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_getclass_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(&class_entry->function_table, "getclass", sizeof("getclass") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_getclass_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_0)); attribute_Deprecated_func_getclass_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_getclass_0_arg1_str = zend_string_init("use ReflectionParameter::getType() instead", strlen("use ReflectionParameter::getType() instead"), 1); ZVAL_STR(&attribute_Deprecated_func_getclass_0->args[1].value, attribute_Deprecated_func_getclass_0_arg1_str); attribute_Deprecated_func_getclass_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_attribute *attribute_Deprecated_func_isarray_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "isarray", sizeof("isarray") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_isarray_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(&class_entry->function_table, "isarray", sizeof("isarray") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_isarray_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_0)); attribute_Deprecated_func_isarray_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); ZVAL_STR_COPY(&attribute_Deprecated_func_isarray_0->args[1].value, attribute_Deprecated_func_getclass_0_arg1_str); attribute_Deprecated_func_isarray_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_attribute *attribute_Deprecated_func_iscallable_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "iscallable", sizeof("iscallable") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_iscallable_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(&class_entry->function_table, "iscallable", sizeof("iscallable") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_iscallable_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_0)); attribute_Deprecated_func_iscallable_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); ZVAL_STR_COPY(&attribute_Deprecated_func_iscallable_0->args[1].value, attribute_Deprecated_func_getclass_0_arg1_str); diff --git a/ext/shmop/shmop_arginfo.h b/ext/shmop/shmop_arginfo.h index f376b8556d930..253c5ddcb56c0 100644 --- a/ext/shmop/shmop_arginfo.h +++ b/ext/shmop/shmop_arginfo.h @@ -52,7 +52,7 @@ static const zend_function_entry ext_functions[] = { static void register_shmop_symbols(int module_number) { - zend_attribute *attribute_Deprecated_func_shmop_close_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "shmop_close", sizeof("shmop_close") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_shmop_close_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "shmop_close", sizeof("shmop_close") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_shmop_close_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_0)); attribute_Deprecated_func_shmop_close_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_shmop_close_0_arg1_str = zend_string_init("as Shmop objects are freed automatically", strlen("as Shmop objects are freed automatically"), 1); diff --git a/ext/sodium/libsodium_arginfo.h b/ext/sodium/libsodium_arginfo.h index 5fbd831c22e4a..dd71534f4466f 100644 --- a/ext/sodium/libsodium_arginfo.h +++ b/ext/sodium/libsodium_arginfo.h @@ -886,180 +886,180 @@ static void register_libsodium_symbols(int module_number) #if defined(HAVE_AESGCM) - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_aead_aes256gcm_decrypt", sizeof("sodium_crypto_aead_aes256gcm_decrypt") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_aead_aes256gcm_decrypt", sizeof("sodium_crypto_aead_aes256gcm_decrypt") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_aead_aes256gcm_encrypt", sizeof("sodium_crypto_aead_aes256gcm_encrypt") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_aead_aes256gcm_encrypt", sizeof("sodium_crypto_aead_aes256gcm_encrypt") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_aead_aes256gcm_encrypt", sizeof("sodium_crypto_aead_aes256gcm_encrypt") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_aead_aes256gcm_encrypt", sizeof("sodium_crypto_aead_aes256gcm_encrypt") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); #endif #if defined(crypto_aead_aegis128l_KEYBYTES) - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_aead_aegis128l_decrypt", sizeof("sodium_crypto_aead_aegis128l_decrypt") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_aead_aegis128l_decrypt", sizeof("sodium_crypto_aead_aegis128l_decrypt") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_aead_aegis128l_encrypt", sizeof("sodium_crypto_aead_aegis128l_encrypt") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_aead_aegis128l_encrypt", sizeof("sodium_crypto_aead_aegis128l_encrypt") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_aead_aegis128l_encrypt", sizeof("sodium_crypto_aead_aegis128l_encrypt") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_aead_aegis128l_encrypt", sizeof("sodium_crypto_aead_aegis128l_encrypt") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); #endif #if defined(crypto_aead_aegis256_KEYBYTES) - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_aead_aegis256_decrypt", sizeof("sodium_crypto_aead_aegis256_decrypt") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_aead_aegis256_decrypt", sizeof("sodium_crypto_aead_aegis256_decrypt") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_aead_aegis256_encrypt", sizeof("sodium_crypto_aead_aegis256_encrypt") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_aead_aegis256_encrypt", sizeof("sodium_crypto_aead_aegis256_encrypt") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_aead_aegis256_encrypt", sizeof("sodium_crypto_aead_aegis256_encrypt") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_aead_aegis256_encrypt", sizeof("sodium_crypto_aead_aegis256_encrypt") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); #endif - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_aead_chacha20poly1305_decrypt", sizeof("sodium_crypto_aead_chacha20poly1305_decrypt") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_aead_chacha20poly1305_decrypt", sizeof("sodium_crypto_aead_chacha20poly1305_decrypt") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_aead_chacha20poly1305_encrypt", sizeof("sodium_crypto_aead_chacha20poly1305_encrypt") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_aead_chacha20poly1305_encrypt", sizeof("sodium_crypto_aead_chacha20poly1305_encrypt") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_aead_chacha20poly1305_encrypt", sizeof("sodium_crypto_aead_chacha20poly1305_encrypt") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_aead_chacha20poly1305_encrypt", sizeof("sodium_crypto_aead_chacha20poly1305_encrypt") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_aead_chacha20poly1305_ietf_decrypt", sizeof("sodium_crypto_aead_chacha20poly1305_ietf_decrypt") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_aead_chacha20poly1305_ietf_decrypt", sizeof("sodium_crypto_aead_chacha20poly1305_ietf_decrypt") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_aead_chacha20poly1305_ietf_encrypt", sizeof("sodium_crypto_aead_chacha20poly1305_ietf_encrypt") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_aead_chacha20poly1305_ietf_encrypt", sizeof("sodium_crypto_aead_chacha20poly1305_ietf_encrypt") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_aead_chacha20poly1305_ietf_encrypt", sizeof("sodium_crypto_aead_chacha20poly1305_ietf_encrypt") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_aead_chacha20poly1305_ietf_encrypt", sizeof("sodium_crypto_aead_chacha20poly1305_ietf_encrypt") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); #if defined(crypto_aead_xchacha20poly1305_IETF_NPUBBYTES) - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_aead_xchacha20poly1305_ietf_decrypt", sizeof("sodium_crypto_aead_xchacha20poly1305_ietf_decrypt") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_aead_xchacha20poly1305_ietf_decrypt", sizeof("sodium_crypto_aead_xchacha20poly1305_ietf_decrypt") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_aead_xchacha20poly1305_ietf_encrypt", sizeof("sodium_crypto_aead_xchacha20poly1305_ietf_encrypt") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_aead_xchacha20poly1305_ietf_encrypt", sizeof("sodium_crypto_aead_xchacha20poly1305_ietf_encrypt") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_aead_xchacha20poly1305_ietf_encrypt", sizeof("sodium_crypto_aead_xchacha20poly1305_ietf_encrypt") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_aead_xchacha20poly1305_ietf_encrypt", sizeof("sodium_crypto_aead_xchacha20poly1305_ietf_encrypt") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); #endif - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_auth", sizeof("sodium_crypto_auth") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_auth", sizeof("sodium_crypto_auth") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_auth_verify", sizeof("sodium_crypto_auth_verify") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_auth_verify", sizeof("sodium_crypto_auth_verify") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_box", sizeof("sodium_crypto_box") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_box", sizeof("sodium_crypto_box") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_box", sizeof("sodium_crypto_box") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_box", sizeof("sodium_crypto_box") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_box_seed_keypair", sizeof("sodium_crypto_box_seed_keypair") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_box_seed_keypair", sizeof("sodium_crypto_box_seed_keypair") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_box_keypair_from_secretkey_and_publickey", sizeof("sodium_crypto_box_keypair_from_secretkey_and_publickey") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_box_keypair_from_secretkey_and_publickey", sizeof("sodium_crypto_box_keypair_from_secretkey_and_publickey") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_box_open", sizeof("sodium_crypto_box_open") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_box_open", sizeof("sodium_crypto_box_open") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_box_publickey", sizeof("sodium_crypto_box_publickey") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_box_publickey", sizeof("sodium_crypto_box_publickey") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_box_publickey_from_secretkey", sizeof("sodium_crypto_box_publickey_from_secretkey") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_box_publickey_from_secretkey", sizeof("sodium_crypto_box_publickey_from_secretkey") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_box_seal", sizeof("sodium_crypto_box_seal") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_box_seal", sizeof("sodium_crypto_box_seal") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_box_seal_open", sizeof("sodium_crypto_box_seal_open") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_box_seal_open", sizeof("sodium_crypto_box_seal_open") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_box_secretkey", sizeof("sodium_crypto_box_secretkey") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_box_secretkey", sizeof("sodium_crypto_box_secretkey") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_kx_publickey", sizeof("sodium_crypto_kx_publickey") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_kx_publickey", sizeof("sodium_crypto_kx_publickey") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_kx_secretkey", sizeof("sodium_crypto_kx_secretkey") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_kx_secretkey", sizeof("sodium_crypto_kx_secretkey") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_kx_seed_keypair", sizeof("sodium_crypto_kx_seed_keypair") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_kx_seed_keypair", sizeof("sodium_crypto_kx_seed_keypair") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_kx_client_session_keys", sizeof("sodium_crypto_kx_client_session_keys") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_kx_client_session_keys", sizeof("sodium_crypto_kx_client_session_keys") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_kx_server_session_keys", sizeof("sodium_crypto_kx_server_session_keys") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_kx_server_session_keys", sizeof("sodium_crypto_kx_server_session_keys") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_generichash", sizeof("sodium_crypto_generichash") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_generichash", sizeof("sodium_crypto_generichash") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_generichash_init", sizeof("sodium_crypto_generichash_init") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_generichash_init", sizeof("sodium_crypto_generichash_init") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_kdf_derive_from_key", sizeof("sodium_crypto_kdf_derive_from_key") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_kdf_derive_from_key", sizeof("sodium_crypto_kdf_derive_from_key") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); #if defined(crypto_pwhash_SALTBYTES) - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_pwhash", sizeof("sodium_crypto_pwhash") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_pwhash", sizeof("sodium_crypto_pwhash") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_pwhash_str", sizeof("sodium_crypto_pwhash_str") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_pwhash_str", sizeof("sodium_crypto_pwhash_str") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_pwhash_str_verify", sizeof("sodium_crypto_pwhash_str_verify") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_pwhash_str_verify", sizeof("sodium_crypto_pwhash_str_verify") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); #endif #if defined(crypto_pwhash_scryptsalsa208sha256_SALTBYTES) - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_pwhash_scryptsalsa208sha256", sizeof("sodium_crypto_pwhash_scryptsalsa208sha256") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_pwhash_scryptsalsa208sha256", sizeof("sodium_crypto_pwhash_scryptsalsa208sha256") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_pwhash_scryptsalsa208sha256_str", sizeof("sodium_crypto_pwhash_scryptsalsa208sha256_str") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_pwhash_scryptsalsa208sha256_str", sizeof("sodium_crypto_pwhash_scryptsalsa208sha256_str") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_pwhash_scryptsalsa208sha256_str_verify", sizeof("sodium_crypto_pwhash_scryptsalsa208sha256_str_verify") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_pwhash_scryptsalsa208sha256_str_verify", sizeof("sodium_crypto_pwhash_scryptsalsa208sha256_str_verify") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); #endif - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_secretbox", sizeof("sodium_crypto_secretbox") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_secretbox", sizeof("sodium_crypto_secretbox") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_secretbox", sizeof("sodium_crypto_secretbox") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_secretbox", sizeof("sodium_crypto_secretbox") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_secretbox_open", sizeof("sodium_crypto_secretbox_open") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_secretbox_open", sizeof("sodium_crypto_secretbox_open") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); #if defined(crypto_secretstream_xchacha20poly1305_ABYTES) - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_secretstream_xchacha20poly1305_init_push", sizeof("sodium_crypto_secretstream_xchacha20poly1305_init_push") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_secretstream_xchacha20poly1305_init_push", sizeof("sodium_crypto_secretstream_xchacha20poly1305_init_push") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_secretstream_xchacha20poly1305_push", sizeof("sodium_crypto_secretstream_xchacha20poly1305_push") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_secretstream_xchacha20poly1305_push", sizeof("sodium_crypto_secretstream_xchacha20poly1305_push") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_secretstream_xchacha20poly1305_init_pull", sizeof("sodium_crypto_secretstream_xchacha20poly1305_init_pull") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_secretstream_xchacha20poly1305_init_pull", sizeof("sodium_crypto_secretstream_xchacha20poly1305_init_pull") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); #endif - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_shorthash", sizeof("sodium_crypto_shorthash") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_shorthash", sizeof("sodium_crypto_shorthash") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_sign", sizeof("sodium_crypto_sign") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_sign", sizeof("sodium_crypto_sign") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_sign_detached", sizeof("sodium_crypto_sign_detached") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_sign_detached", sizeof("sodium_crypto_sign_detached") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_sign_ed25519_sk_to_curve25519", sizeof("sodium_crypto_sign_ed25519_sk_to_curve25519") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_sign_ed25519_sk_to_curve25519", sizeof("sodium_crypto_sign_ed25519_sk_to_curve25519") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_sign_keypair_from_secretkey_and_publickey", sizeof("sodium_crypto_sign_keypair_from_secretkey_and_publickey") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_sign_keypair_from_secretkey_and_publickey", sizeof("sodium_crypto_sign_keypair_from_secretkey_and_publickey") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_sign_publickey", sizeof("sodium_crypto_sign_publickey") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_sign_publickey", sizeof("sodium_crypto_sign_publickey") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_sign_secretkey", sizeof("sodium_crypto_sign_secretkey") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_sign_secretkey", sizeof("sodium_crypto_sign_secretkey") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_sign_publickey_from_secretkey", sizeof("sodium_crypto_sign_publickey_from_secretkey") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_sign_publickey_from_secretkey", sizeof("sodium_crypto_sign_publickey_from_secretkey") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_sign_seed_keypair", sizeof("sodium_crypto_sign_seed_keypair") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_sign_seed_keypair", sizeof("sodium_crypto_sign_seed_keypair") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_stream", sizeof("sodium_crypto_stream") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_stream", sizeof("sodium_crypto_stream") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_stream_xor", sizeof("sodium_crypto_stream_xor") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_stream_xor", sizeof("sodium_crypto_stream_xor") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_stream_xor", sizeof("sodium_crypto_stream_xor") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_stream_xor", sizeof("sodium_crypto_stream_xor") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); #if defined(crypto_stream_xchacha20_KEYBYTES) - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_stream_xchacha20", sizeof("sodium_crypto_stream_xchacha20") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_stream_xchacha20", sizeof("sodium_crypto_stream_xchacha20") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_stream_xchacha20_xor", sizeof("sodium_crypto_stream_xchacha20_xor") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_stream_xchacha20_xor", sizeof("sodium_crypto_stream_xchacha20_xor") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_stream_xchacha20_xor", sizeof("sodium_crypto_stream_xchacha20_xor") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_stream_xchacha20_xor", sizeof("sodium_crypto_stream_xchacha20_xor") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_stream_xchacha20_xor_ic", sizeof("sodium_crypto_stream_xchacha20_xor_ic") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_stream_xchacha20_xor_ic", sizeof("sodium_crypto_stream_xchacha20_xor_ic") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_stream_xchacha20_xor_ic", sizeof("sodium_crypto_stream_xchacha20_xor_ic") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_stream_xchacha20_xor_ic", sizeof("sodium_crypto_stream_xchacha20_xor_ic") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); #endif - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_compare", sizeof("sodium_compare") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_compare", sizeof("sodium_compare") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_compare", sizeof("sodium_compare") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_compare", sizeof("sodium_compare") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_memcmp", sizeof("sodium_memcmp") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_memcmp", sizeof("sodium_memcmp") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_memcmp", sizeof("sodium_memcmp") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_memcmp", sizeof("sodium_memcmp") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_memzero", sizeof("sodium_memzero") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_memzero", sizeof("sodium_memzero") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_pad", sizeof("sodium_pad") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_pad", sizeof("sodium_pad") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_unpad", sizeof("sodium_unpad") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_unpad", sizeof("sodium_unpad") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_bin2hex", sizeof("sodium_bin2hex") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_bin2hex", sizeof("sodium_bin2hex") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_hex2bin", sizeof("sodium_hex2bin") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_hex2bin", sizeof("sodium_hex2bin") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); #if defined(sodium_base64_VARIANT_ORIGINAL) - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_bin2base64", sizeof("sodium_bin2base64") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_bin2base64", sizeof("sodium_bin2base64") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_base642bin", sizeof("sodium_base642bin") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_base642bin", sizeof("sodium_base642bin") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); #endif - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_scalarmult_base", sizeof("sodium_crypto_scalarmult_base") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "sodium_crypto_scalarmult_base", sizeof("sodium_crypto_scalarmult_base") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); } static zend_class_entry *register_class_SodiumException(zend_class_entry *class_entry_Exception) diff --git a/ext/spl/spl_directory_arginfo.h b/ext/spl/spl_directory_arginfo.h index 3b37c1ed6fd0e..c74fc3c1ff301 100644 --- a/ext/spl/spl_directory_arginfo.h +++ b/ext/spl/spl_directory_arginfo.h @@ -481,7 +481,7 @@ static zend_class_entry *register_class_SplFileInfo(zend_class_entry *class_entr zend_class_implements(class_entry, 1, class_entry_Stringable); - zend_attribute *attribute_Deprecated_func__bad_state_ex_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "_bad_state_ex", sizeof("_bad_state_ex") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 1); + zend_attribute *attribute_Deprecated_func__bad_state_ex_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(&class_entry->function_table, "_bad_state_ex", sizeof("_bad_state_ex") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 1); ZVAL_STR(&attribute_Deprecated_func__bad_state_ex_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_2)); attribute_Deprecated_func__bad_state_ex_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); diff --git a/ext/spl/spl_fixedarray_arginfo.h b/ext/spl/spl_fixedarray_arginfo.h index d3d84deabe6ec..5bf3b906f194d 100644 --- a/ext/spl/spl_fixedarray_arginfo.h +++ b/ext/spl/spl_fixedarray_arginfo.h @@ -97,7 +97,7 @@ static zend_class_entry *register_class_SplFixedArray(zend_class_entry *class_en zend_class_implements(class_entry, 4, class_entry_IteratorAggregate, class_entry_ArrayAccess, class_entry_Countable, class_entry_JsonSerializable); - zend_attribute *attribute_Deprecated_func___wakeup_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "__wakeup", sizeof("__wakeup") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func___wakeup_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(&class_entry->function_table, "__wakeup", sizeof("__wakeup") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func___wakeup_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_4)); attribute_Deprecated_func___wakeup_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func___wakeup_0_arg1_str = zend_string_init("this method is obsolete, as serialization hooks are provided by __unserialize() and __serialize()", strlen("this method is obsolete, as serialization hooks are provided by __unserialize() and __serialize()"), 1); diff --git a/ext/spl/spl_observer_arginfo.h b/ext/spl/spl_observer_arginfo.h index fec3ccb84203d..d0d184ca62f44 100644 --- a/ext/spl/spl_observer_arginfo.h +++ b/ext/spl/spl_observer_arginfo.h @@ -259,21 +259,21 @@ static zend_class_entry *register_class_SplObjectStorage(zend_class_entry *class zend_class_implements(class_entry, 4, class_entry_Countable, class_entry_SeekableIterator, class_entry_Serializable, class_entry_ArrayAccess); - zend_attribute *attribute_Deprecated_func_attach_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "attach", sizeof("attach") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_attach_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(&class_entry->function_table, "attach", sizeof("attach") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_attach_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_5)); attribute_Deprecated_func_attach_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_attach_0_arg1_str = zend_string_init("use method SplObjectStorage::offsetSet() instead", strlen("use method SplObjectStorage::offsetSet() instead"), 1); ZVAL_STR(&attribute_Deprecated_func_attach_0->args[1].value, attribute_Deprecated_func_attach_0_arg1_str); attribute_Deprecated_func_attach_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_attribute *attribute_Deprecated_func_detach_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "detach", sizeof("detach") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_detach_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(&class_entry->function_table, "detach", sizeof("detach") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_detach_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_5)); attribute_Deprecated_func_detach_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_detach_0_arg1_str = zend_string_init("use method SplObjectStorage::offsetUnset() instead", strlen("use method SplObjectStorage::offsetUnset() instead"), 1); ZVAL_STR(&attribute_Deprecated_func_detach_0->args[1].value, attribute_Deprecated_func_detach_0_arg1_str); attribute_Deprecated_func_detach_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_attribute *attribute_Deprecated_func_contains_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "contains", sizeof("contains") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_contains_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(&class_entry->function_table, "contains", sizeof("contains") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_contains_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_5)); attribute_Deprecated_func_contains_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_contains_0_arg1_str = zend_string_init("use method SplObjectStorage::offsetExists() instead", strlen("use method SplObjectStorage::offsetExists() instead"), 1); diff --git a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h index 0a21d7d76426c..e250c3d9ae522 100644 --- a/ext/standard/basic_functions_arginfo.h +++ b/ext/standard/basic_functions_arginfo.h @@ -3891,10 +3891,10 @@ static void register_basic_functions_symbols(int module_number) #endif - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "crypt", sizeof("crypt") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "crypt", sizeof("crypt") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); #if defined(HAVE_STRPTIME) - zend_attribute *attribute_Deprecated_func_strptime_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "strptime", sizeof("strptime") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_strptime_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "strptime", sizeof("strptime") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_strptime_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_2)); attribute_Deprecated_func_strptime_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_strptime_0_arg1_str = zend_string_init("use date_parse_from_format() (for locale-independent parsing), or IntlDateFormatter::parse() (for locale-dependent parsing) instead", strlen("use date_parse_from_format() (for locale-independent parsing), or IntlDateFormatter::parse() (for locale-dependent parsing) instead"), 1); @@ -3902,29 +3902,29 @@ static void register_basic_functions_symbols(int module_number) attribute_Deprecated_func_strptime_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); #endif - zend_attribute *attribute_Deprecated_func_assert_options_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "assert_options", sizeof("assert_options") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 1); + zend_attribute *attribute_Deprecated_func_assert_options_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "assert_options", sizeof("assert_options") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 1); ZVAL_STR(&attribute_Deprecated_func_assert_options_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_3)); attribute_Deprecated_func_assert_options_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); - zend_attribute *attribute_Deprecated_func_utf8_encode_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "utf8_encode", sizeof("utf8_encode") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_utf8_encode_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "utf8_encode", sizeof("utf8_encode") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_utf8_encode_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_2)); attribute_Deprecated_func_utf8_encode_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_utf8_encode_0_arg1_str = zend_string_init("visit the php.net documentation for various alternatives", strlen("visit the php.net documentation for various alternatives"), 1); ZVAL_STR(&attribute_Deprecated_func_utf8_encode_0->args[1].value, attribute_Deprecated_func_utf8_encode_0_arg1_str); attribute_Deprecated_func_utf8_encode_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_attribute *attribute_Deprecated_func_utf8_decode_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "utf8_decode", sizeof("utf8_decode") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_utf8_decode_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "utf8_decode", sizeof("utf8_decode") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_utf8_decode_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_2)); attribute_Deprecated_func_utf8_decode_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); ZVAL_STR_COPY(&attribute_Deprecated_func_utf8_decode_0->args[1].value, attribute_Deprecated_func_utf8_encode_0_arg1_str); attribute_Deprecated_func_utf8_decode_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "password_hash", sizeof("password_hash") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "password_hash", sizeof("password_hash") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "password_verify", sizeof("password_verify") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "password_verify", sizeof("password_verify") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); #if (defined(HAVE_SYS_TIME_H) || defined(PHP_WIN32)) - zend_attribute *attribute_Deprecated_func_socket_set_timeout_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "socket_set_timeout", sizeof("socket_set_timeout") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_socket_set_timeout_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "socket_set_timeout", sizeof("socket_set_timeout") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_socket_set_timeout_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_5)); attribute_Deprecated_func_socket_set_timeout_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_socket_set_timeout_0_arg1_str = zend_string_init("use stream_set_timeout() instead", strlen("use stream_set_timeout() instead"), 1); diff --git a/ext/uri/php_uri_arginfo.h b/ext/uri/php_uri_arginfo.h index d3a9c4fde7bca..bd7b25da99b0f 100644 --- a/ext/uri/php_uri_arginfo.h +++ b/ext/uri/php_uri_arginfo.h @@ -360,7 +360,7 @@ static zend_class_entry *register_class_Uri_Rfc3986_Uri(void) class_entry = zend_register_internal_class_with_flags(&ce, NULL, ZEND_ACC_FINAL|ZEND_ACC_NO_DYNAMIC_PROPERTIES|ZEND_ACC_READONLY_CLASS); - zend_add_parameter_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "withuserinfo", sizeof("withuserinfo") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(&class_entry->function_table, "withuserinfo", sizeof("withuserinfo") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); return class_entry; } @@ -481,7 +481,7 @@ static zend_class_entry *register_class_Uri_WhatWg_Url(void) class_entry = zend_register_internal_class_with_flags(&ce, NULL, ZEND_ACC_FINAL|ZEND_ACC_NO_DYNAMIC_PROPERTIES|ZEND_ACC_READONLY_CLASS); - zend_add_parameter_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "withpassword", sizeof("withpassword") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(&class_entry->function_table, "withpassword", sizeof("withpassword") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); return class_entry; } diff --git a/ext/xml/xml_arginfo.h b/ext/xml/xml_arginfo.h index 784424e7fd3ae..ce7e96c4fc421 100644 --- a/ext/xml/xml_arginfo.h +++ b/ext/xml/xml_arginfo.h @@ -163,14 +163,14 @@ static void register_xml_symbols(int module_number) REGISTER_STRING_CONSTANT("XML_SAX_IMPL", PHP_XML_SAX_IMPL, CONST_PERSISTENT); - zend_attribute *attribute_Deprecated_func_xml_set_object_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "xml_set_object", sizeof("xml_set_object") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_xml_set_object_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "xml_set_object", sizeof("xml_set_object") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_xml_set_object_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_4)); attribute_Deprecated_func_xml_set_object_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_xml_set_object_0_arg1_str = zend_string_init("provide a proper method callable to xml_set_*_handler() functions", strlen("provide a proper method callable to xml_set_*_handler() functions"), 1); ZVAL_STR(&attribute_Deprecated_func_xml_set_object_0->args[1].value, attribute_Deprecated_func_xml_set_object_0_arg1_str); attribute_Deprecated_func_xml_set_object_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_attribute *attribute_Deprecated_func_xml_parser_free_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "xml_parser_free", sizeof("xml_parser_free") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_xml_parser_free_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "xml_parser_free", sizeof("xml_parser_free") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_xml_parser_free_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_5)); attribute_Deprecated_func_xml_parser_free_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_xml_parser_free_0_arg1_str = zend_string_init("as it has no effect since PHP 8.0", strlen("as it has no effect since PHP 8.0"), 1); diff --git a/ext/zend_test/test_arginfo.h b/ext/zend_test/test_arginfo.h index 683b3b38648b6..a18f7ddabf614 100644 --- a/ext/zend_test/test_arginfo.h +++ b/ext/zend_test/test_arginfo.h @@ -629,39 +629,39 @@ static void register_test_symbols(int module_number) zend_string *attribute_name_Deprecated_func_zend_test_deprecated_attr_0 = zend_string_init_interned("Deprecated", sizeof("Deprecated") - 1, true); - zend_attribute *attribute_Deprecated_func_zend_test_deprecated_attr_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "zend_test_deprecated_attr", sizeof("zend_test_deprecated_attr") - 1), attribute_name_Deprecated_func_zend_test_deprecated_attr_0, 1); + zend_attribute *attribute_Deprecated_func_zend_test_deprecated_attr_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "zend_test_deprecated_attr", sizeof("zend_test_deprecated_attr") - 1), attribute_name_Deprecated_func_zend_test_deprecated_attr_0, 1); zend_string_release_ex(attribute_name_Deprecated_func_zend_test_deprecated_attr_0, true); zend_string *attribute_Deprecated_func_zend_test_deprecated_attr_0_arg0_str = zend_string_init("custom message", strlen("custom message"), 1); ZVAL_STR(&attribute_Deprecated_func_zend_test_deprecated_attr_0->args[0].value, attribute_Deprecated_func_zend_test_deprecated_attr_0_arg0_str); attribute_Deprecated_func_zend_test_deprecated_attr_0->args[0].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); zend_string *attribute_name_NoDiscard_func_zend_test_nodiscard_0 = zend_string_init_interned("NoDiscard", sizeof("NoDiscard") - 1, true); - zend_attribute *attribute_NoDiscard_func_zend_test_nodiscard_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "zend_test_nodiscard", sizeof("zend_test_nodiscard") - 1), attribute_name_NoDiscard_func_zend_test_nodiscard_0, 1); + zend_attribute *attribute_NoDiscard_func_zend_test_nodiscard_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "zend_test_nodiscard", sizeof("zend_test_nodiscard") - 1), attribute_name_NoDiscard_func_zend_test_nodiscard_0, 1); zend_string_release_ex(attribute_name_NoDiscard_func_zend_test_nodiscard_0, true); ZVAL_STR_COPY(&attribute_NoDiscard_func_zend_test_nodiscard_0->args[0].value, attribute_Deprecated_func_zend_test_deprecated_attr_0_arg0_str); attribute_NoDiscard_func_zend_test_nodiscard_0->args[0].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); zend_string *attribute_name_Deprecated_func_zend_test_deprecated_nodiscard_0 = zend_string_init_interned("Deprecated", sizeof("Deprecated") - 1, true); - zend_attribute *attribute_Deprecated_func_zend_test_deprecated_nodiscard_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "zend_test_deprecated_nodiscard", sizeof("zend_test_deprecated_nodiscard") - 1), attribute_name_Deprecated_func_zend_test_deprecated_nodiscard_0, 1); + zend_attribute *attribute_Deprecated_func_zend_test_deprecated_nodiscard_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "zend_test_deprecated_nodiscard", sizeof("zend_test_deprecated_nodiscard") - 1), attribute_name_Deprecated_func_zend_test_deprecated_nodiscard_0, 1); zend_string_release_ex(attribute_name_Deprecated_func_zend_test_deprecated_nodiscard_0, true); ZVAL_STR_COPY(&attribute_Deprecated_func_zend_test_deprecated_nodiscard_0->args[0].value, attribute_Deprecated_func_zend_test_deprecated_attr_0_arg0_str); attribute_Deprecated_func_zend_test_deprecated_nodiscard_0->args[0].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); zend_string *attribute_name_NoDiscard_func_zend_test_deprecated_nodiscard_1 = zend_string_init_interned("NoDiscard", sizeof("NoDiscard") - 1, true); - zend_attribute *attribute_NoDiscard_func_zend_test_deprecated_nodiscard_1 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "zend_test_deprecated_nodiscard", sizeof("zend_test_deprecated_nodiscard") - 1), attribute_name_NoDiscard_func_zend_test_deprecated_nodiscard_1, 1); + zend_attribute *attribute_NoDiscard_func_zend_test_deprecated_nodiscard_1 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "zend_test_deprecated_nodiscard", sizeof("zend_test_deprecated_nodiscard") - 1), attribute_name_NoDiscard_func_zend_test_deprecated_nodiscard_1, 1); zend_string_release_ex(attribute_name_NoDiscard_func_zend_test_deprecated_nodiscard_1, true); zend_string *attribute_NoDiscard_func_zend_test_deprecated_nodiscard_1_arg0_str = zend_string_init("custom message 2", strlen("custom message 2"), 1); ZVAL_STR(&attribute_NoDiscard_func_zend_test_deprecated_nodiscard_1->args[0].value, attribute_NoDiscard_func_zend_test_deprecated_nodiscard_1_arg0_str); attribute_NoDiscard_func_zend_test_deprecated_nodiscard_1->args[0].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); zend_string *attribute_name_ZendTestParameterAttribute_func_zend_test_parameter_with_attribute_arg0_0 = zend_string_init_interned("ZendTestParameterAttribute", sizeof("ZendTestParameterAttribute") - 1, true); - zend_attribute *attribute_ZendTestParameterAttribute_func_zend_test_parameter_with_attribute_arg0_0 = zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "zend_test_parameter_with_attribute", sizeof("zend_test_parameter_with_attribute") - 1), 0, attribute_name_ZendTestParameterAttribute_func_zend_test_parameter_with_attribute_arg0_0, 1); + zend_attribute *attribute_ZendTestParameterAttribute_func_zend_test_parameter_with_attribute_arg0_0 = zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "zend_test_parameter_with_attribute", sizeof("zend_test_parameter_with_attribute") - 1), 0, attribute_name_ZendTestParameterAttribute_func_zend_test_parameter_with_attribute_arg0_0, 1); zend_string_release_ex(attribute_name_ZendTestParameterAttribute_func_zend_test_parameter_with_attribute_arg0_0, true); zend_string *attribute_ZendTestParameterAttribute_func_zend_test_parameter_with_attribute_arg0_0_arg0_str = zend_string_init("value1", strlen("value1"), 1); ZVAL_STR(&attribute_ZendTestParameterAttribute_func_zend_test_parameter_with_attribute_arg0_0->args[0].value, attribute_ZendTestParameterAttribute_func_zend_test_parameter_with_attribute_arg0_0_arg0_str); zend_string *attribute_name_ZendTestAttributeWithArguments_func_zend_test_attribute_with_named_argument_0 = zend_string_init_interned("ZendTestAttributeWithArguments", sizeof("ZendTestAttributeWithArguments") - 1, true); - zend_attribute *attribute_ZendTestAttributeWithArguments_func_zend_test_attribute_with_named_argument_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "zend_test_attribute_with_named_argument", sizeof("zend_test_attribute_with_named_argument") - 1), attribute_name_ZendTestAttributeWithArguments_func_zend_test_attribute_with_named_argument_0, 1); + zend_attribute *attribute_ZendTestAttributeWithArguments_func_zend_test_attribute_with_named_argument_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "zend_test_attribute_with_named_argument", sizeof("zend_test_attribute_with_named_argument") - 1), attribute_name_ZendTestAttributeWithArguments_func_zend_test_attribute_with_named_argument_0, 1); zend_string_release_ex(attribute_name_ZendTestAttributeWithArguments_func_zend_test_attribute_with_named_argument_0, true); zend_string *attribute_ZendTestAttributeWithArguments_func_zend_test_attribute_with_named_argument_0_arg0_str = zend_string_init("foo", strlen("foo"), 1); ZVAL_STR(&attribute_ZendTestAttributeWithArguments_func_zend_test_attribute_with_named_argument_0->args[0].value, attribute_ZendTestAttributeWithArguments_func_zend_test_attribute_with_named_argument_0_arg0_str); @@ -948,7 +948,7 @@ static zend_class_entry *register_class_ZendAttributeTest(void) zend_string *attribute_name_ZendTestAttribute_func_testmethod_0 = zend_string_init_interned("ZendTestAttribute", sizeof("ZendTestAttribute") - 1, true); - zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "testmethod", sizeof("testmethod") - 1), attribute_name_ZendTestAttribute_func_testmethod_0, 0); + zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(&class_entry->function_table, "testmethod", sizeof("testmethod") - 1), attribute_name_ZendTestAttribute_func_testmethod_0, 0); zend_string_release_ex(attribute_name_ZendTestAttribute_func_testmethod_0, true); return class_entry; @@ -1127,13 +1127,13 @@ static zend_class_entry *register_class_ZendTestClassWithMethodWithParameterAttr zend_string *attribute_name_ZendTestParameterAttribute_func_no_override_arg0_0 = zend_string_init_interned("ZendTestParameterAttribute", sizeof("ZendTestParameterAttribute") - 1, true); - zend_attribute *attribute_ZendTestParameterAttribute_func_no_override_arg0_0 = zend_add_parameter_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "no_override", sizeof("no_override") - 1), 0, attribute_name_ZendTestParameterAttribute_func_no_override_arg0_0, 1); + zend_attribute *attribute_ZendTestParameterAttribute_func_no_override_arg0_0 = zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(&class_entry->function_table, "no_override", sizeof("no_override") - 1), 0, attribute_name_ZendTestParameterAttribute_func_no_override_arg0_0, 1); zend_string_release_ex(attribute_name_ZendTestParameterAttribute_func_no_override_arg0_0, true); zend_string *attribute_ZendTestParameterAttribute_func_no_override_arg0_0_arg0_str = zend_string_init("value2", strlen("value2"), 1); ZVAL_STR(&attribute_ZendTestParameterAttribute_func_no_override_arg0_0->args[0].value, attribute_ZendTestParameterAttribute_func_no_override_arg0_0_arg0_str); zend_string *attribute_name_ZendTestParameterAttribute_func_override_arg0_0 = zend_string_init_interned("ZendTestParameterAttribute", sizeof("ZendTestParameterAttribute") - 1, true); - zend_attribute *attribute_ZendTestParameterAttribute_func_override_arg0_0 = zend_add_parameter_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "override", sizeof("override") - 1), 0, attribute_name_ZendTestParameterAttribute_func_override_arg0_0, 1); + zend_attribute *attribute_ZendTestParameterAttribute_func_override_arg0_0 = zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(&class_entry->function_table, "override", sizeof("override") - 1), 0, attribute_name_ZendTestParameterAttribute_func_override_arg0_0, 1); zend_string_release_ex(attribute_name_ZendTestParameterAttribute_func_override_arg0_0, true); zend_string *attribute_ZendTestParameterAttribute_func_override_arg0_0_arg0_str = zend_string_init("value3", strlen("value3"), 1); ZVAL_STR(&attribute_ZendTestParameterAttribute_func_override_arg0_0->args[0].value, attribute_ZendTestParameterAttribute_func_override_arg0_0_arg0_str); @@ -1154,7 +1154,7 @@ static zend_class_entry *register_class_ZendTestChildClassWithMethodWithParamete zend_string *attribute_name_ZendTestParameterAttribute_func_override_arg0_0 = zend_string_init_interned("ZendTestParameterAttribute", sizeof("ZendTestParameterAttribute") - 1, true); - zend_attribute *attribute_ZendTestParameterAttribute_func_override_arg0_0 = zend_add_parameter_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "override", sizeof("override") - 1), 0, attribute_name_ZendTestParameterAttribute_func_override_arg0_0, 1); + zend_attribute *attribute_ZendTestParameterAttribute_func_override_arg0_0 = zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(&class_entry->function_table, "override", sizeof("override") - 1), 0, attribute_name_ZendTestParameterAttribute_func_override_arg0_0, 1); zend_string_release_ex(attribute_name_ZendTestParameterAttribute_func_override_arg0_0, true); zend_string *attribute_ZendTestParameterAttribute_func_override_arg0_0_arg0_str = zend_string_init("value4", strlen("value4"), 1); ZVAL_STR(&attribute_ZendTestParameterAttribute_func_override_arg0_0->args[0].value, attribute_ZendTestParameterAttribute_func_override_arg0_0_arg0_str); diff --git a/ext/zip/php_zip_arginfo.h b/ext/zip/php_zip_arginfo.h index ba4f867e8af73..16ff0f29af1c5 100644 --- a/ext/zip/php_zip_arginfo.h +++ b/ext/zip/php_zip_arginfo.h @@ -458,61 +458,61 @@ static const zend_function_entry class_ZipArchive_methods[] = { static void register_php_zip_symbols(int module_number) { - zend_attribute *attribute_Deprecated_func_zip_open_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "zip_open", sizeof("zip_open") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_zip_open_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "zip_open", sizeof("zip_open") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_zip_open_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_0)); attribute_Deprecated_func_zip_open_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_zip_open_0_arg1_str = zend_string_init("use ZipArchive::open() instead", strlen("use ZipArchive::open() instead"), 1); ZVAL_STR(&attribute_Deprecated_func_zip_open_0->args[1].value, attribute_Deprecated_func_zip_open_0_arg1_str); attribute_Deprecated_func_zip_open_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_attribute *attribute_Deprecated_func_zip_close_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "zip_close", sizeof("zip_close") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_zip_close_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "zip_close", sizeof("zip_close") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_zip_close_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_0)); attribute_Deprecated_func_zip_close_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_zip_close_0_arg1_str = zend_string_init("use ZipArchive::close() instead", strlen("use ZipArchive::close() instead"), 1); ZVAL_STR(&attribute_Deprecated_func_zip_close_0->args[1].value, attribute_Deprecated_func_zip_close_0_arg1_str); attribute_Deprecated_func_zip_close_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_attribute *attribute_Deprecated_func_zip_read_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "zip_read", sizeof("zip_read") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_zip_read_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "zip_read", sizeof("zip_read") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_zip_read_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_0)); attribute_Deprecated_func_zip_read_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_zip_read_0_arg1_str = zend_string_init("use ZipArchive::statIndex() instead", strlen("use ZipArchive::statIndex() instead"), 1); ZVAL_STR(&attribute_Deprecated_func_zip_read_0->args[1].value, attribute_Deprecated_func_zip_read_0_arg1_str); attribute_Deprecated_func_zip_read_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_attribute *attribute_Deprecated_func_zip_entry_open_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "zip_entry_open", sizeof("zip_entry_open") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 1); + zend_attribute *attribute_Deprecated_func_zip_entry_open_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "zip_entry_open", sizeof("zip_entry_open") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 1); ZVAL_STR(&attribute_Deprecated_func_zip_entry_open_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_0)); attribute_Deprecated_func_zip_entry_open_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); - zend_attribute *attribute_Deprecated_func_zip_entry_close_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "zip_entry_close", sizeof("zip_entry_close") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 1); + zend_attribute *attribute_Deprecated_func_zip_entry_close_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "zip_entry_close", sizeof("zip_entry_close") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 1); ZVAL_STR(&attribute_Deprecated_func_zip_entry_close_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_0)); attribute_Deprecated_func_zip_entry_close_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); - zend_attribute *attribute_Deprecated_func_zip_entry_read_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "zip_entry_read", sizeof("zip_entry_read") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_zip_entry_read_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "zip_entry_read", sizeof("zip_entry_read") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_zip_entry_read_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_0)); attribute_Deprecated_func_zip_entry_read_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); zend_string *attribute_Deprecated_func_zip_entry_read_0_arg1_str = zend_string_init("use ZipArchive::getFromIndex() instead", strlen("use ZipArchive::getFromIndex() instead"), 1); ZVAL_STR(&attribute_Deprecated_func_zip_entry_read_0->args[1].value, attribute_Deprecated_func_zip_entry_read_0_arg1_str); attribute_Deprecated_func_zip_entry_read_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_attribute *attribute_Deprecated_func_zip_entry_name_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "zip_entry_name", sizeof("zip_entry_name") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_zip_entry_name_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "zip_entry_name", sizeof("zip_entry_name") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_zip_entry_name_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_0)); attribute_Deprecated_func_zip_entry_name_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); ZVAL_STR_COPY(&attribute_Deprecated_func_zip_entry_name_0->args[1].value, attribute_Deprecated_func_zip_read_0_arg1_str); attribute_Deprecated_func_zip_entry_name_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_attribute *attribute_Deprecated_func_zip_entry_compressedsize_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "zip_entry_compressedsize", sizeof("zip_entry_compressedsize") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_zip_entry_compressedsize_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "zip_entry_compressedsize", sizeof("zip_entry_compressedsize") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_zip_entry_compressedsize_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_0)); attribute_Deprecated_func_zip_entry_compressedsize_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); ZVAL_STR_COPY(&attribute_Deprecated_func_zip_entry_compressedsize_0->args[1].value, attribute_Deprecated_func_zip_read_0_arg1_str); attribute_Deprecated_func_zip_entry_compressedsize_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_attribute *attribute_Deprecated_func_zip_entry_filesize_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "zip_entry_filesize", sizeof("zip_entry_filesize") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_zip_entry_filesize_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "zip_entry_filesize", sizeof("zip_entry_filesize") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_zip_entry_filesize_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_0)); attribute_Deprecated_func_zip_entry_filesize_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); ZVAL_STR_COPY(&attribute_Deprecated_func_zip_entry_filesize_0->args[1].value, attribute_Deprecated_func_zip_read_0_arg1_str); attribute_Deprecated_func_zip_entry_filesize_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); - zend_attribute *attribute_Deprecated_func_zip_entry_compressionmethod_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "zip_entry_compressionmethod", sizeof("zip_entry_compressionmethod") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); + zend_attribute *attribute_Deprecated_func_zip_entry_compressionmethod_0 = zend_add_function_attribute((zend_function *)zend_hash_str_find_ptr(CG(function_table), "zip_entry_compressionmethod", sizeof("zip_entry_compressionmethod") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED_CAPITALIZED), 2); ZVAL_STR(&attribute_Deprecated_func_zip_entry_compressionmethod_0->args[0].value, ZSTR_KNOWN(ZEND_STR_8_DOT_0)); attribute_Deprecated_func_zip_entry_compressionmethod_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); ZVAL_STR_COPY(&attribute_Deprecated_func_zip_entry_compressionmethod_0->args[1].value, attribute_Deprecated_func_zip_read_0_arg1_str); @@ -1272,12 +1272,12 @@ static zend_class_entry *register_class_ZipArchive(zend_class_entry *class_entry #endif - zend_add_parameter_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "setpassword", sizeof("setpassword") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(&class_entry->function_table, "setpassword", sizeof("setpassword") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); #if defined(HAVE_ENCRYPTION) - zend_add_parameter_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "setencryptionname", sizeof("setencryptionname") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(&class_entry->function_table, "setencryptionname", sizeof("setencryptionname") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); - zend_add_parameter_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "setencryptionindex", sizeof("setencryptionindex") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_parameter_attribute((zend_function *)zend_hash_str_find_ptr(&class_entry->function_table, "setencryptionindex", sizeof("setencryptionindex") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); #endif return class_entry; From 4d3831539cb58ab395c60493488048129b612a24 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Thu, 13 Nov 2025 21:57:34 +0000 Subject: [PATCH 8/8] fix windows build attempt --- ext/intl/converter/converter.cpp | 2 +- ext/intl/converter/converter.h | 2 +- ext/intl/php_intl.cpp | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ext/intl/converter/converter.cpp b/ext/intl/converter/converter.cpp index 231f02af4c7a3..ce38d0cca4476 100644 --- a/ext/intl/converter/converter.cpp +++ b/ext/intl/converter/converter.cpp @@ -968,7 +968,7 @@ static zend_object *php_converter_clone_object(zend_object *object) { /* }}} */ /* {{{ php_converter_minit */ -int php_converter_minit(INIT_FUNC_ARGS) { +U_CFUNC int php_converter_minit(INIT_FUNC_ARGS) { php_converter_ce = register_class_UConverter(); php_converter_ce->create_object = php_converter_create_object; php_converter_ce->default_object_handlers = &php_converter_object_handlers; diff --git a/ext/intl/converter/converter.h b/ext/intl/converter/converter.h index f9fb27b82a7d0..c3117c7c0f22d 100644 --- a/ext/intl/converter/converter.h +++ b/ext/intl/converter/converter.h @@ -21,6 +21,6 @@ #include "php.h" -int php_converter_minit(INIT_FUNC_ARGS); +U_CFUNC int php_converter_minit(INIT_FUNC_ARGS); #endif /* PHP_INTL_CONVERTER_H */ diff --git a/ext/intl/php_intl.cpp b/ext/intl/php_intl.cpp index 42e9dab6ae78d..a11949f9ada74 100644 --- a/ext/intl/php_intl.cpp +++ b/ext/intl/php_intl.cpp @@ -156,10 +156,12 @@ zend_module_entry intl_module_entry = { /* }}} */ #ifdef COMPILE_DL_INTL +BEGIN_EXTERN_C() #ifdef ZTS -ZEND_TSRMLS_CACHE_DEFINE() + ZEND_TSRMLS_CACHE_DEFINE() #endif -ZEND_GET_MODULE( intl ) + ZEND_GET_MODULE( intl ) +END_EXTERN_C() #endif /* {{{ intl_init_globals */