Skip to content

Commit e074b2f

Browse files
committed
zend_API: Remove _throw() variants of ZPP
1 parent 54787f2 commit e074b2f

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

UPGRADING.INTERNALS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@ PHP 8.6 INTERNALS UPGRADE NOTES
9292
ZEND_ACC2_FORBID_DYN_CALLS (@forbid-dynamic-calls in stubs). In debug
9393
builds, failing to include that flag will lead to assertion failures.
9494
. The ZEND_RESULT_CODE type has been removed. Use zend_result directly.
95+
. The zend_parse_parameters_none_throw(), zend_parse_parameters_throw(),
96+
and ZEND_PARSE_PARAMS_THROW have been removed due to being misleading,
97+
since ZPP always throws, unless ZEND_PARSE_PARAMS_QUIET is given. Use
98+
the non-throw versions.
9599

96100
========================
97101
2. Build system changes

Zend/zend_API.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -352,18 +352,12 @@ ZEND_API zend_result zend_get_parameters_array_ex(uint32_t param_count, zval *ar
352352
zend_get_parameters_array_ex(param_count, argument_array)
353353
#define zend_parse_parameters_none() \
354354
(EXPECTED(ZEND_NUM_ARGS() == 0) ? SUCCESS : (zend_wrong_parameters_none_error(), FAILURE))
355-
#define zend_parse_parameters_none_throw() \
356-
zend_parse_parameters_none()
357355

358356
/* Parameter parsing API -- andrei */
359357

360-
#define ZEND_PARSE_PARAMS_THROW 0 /* No longer used, zpp always uses exceptions */
361358
#define ZEND_PARSE_PARAMS_QUIET (1<<1)
362359
ZEND_API zend_result zend_parse_parameters(uint32_t num_args, const char *type_spec, ...);
363360
ZEND_API zend_result zend_parse_parameters_ex(int flags, uint32_t num_args, const char *type_spec, ...);
364-
/* NOTE: This must have at least one value in __VA_ARGS__ for the expression to be valid */
365-
#define zend_parse_parameters_throw(num_args, ...) \
366-
zend_parse_parameters(num_args, __VA_ARGS__)
367361
ZEND_API const char *zend_zval_type_name(const zval *arg);
368362
ZEND_API const char *zend_zval_value_name(const zval *arg);
369363
ZEND_API zend_string *zend_zval_get_legacy_type(const zval *arg);

0 commit comments

Comments
 (0)