Skip to content

Fix compilation for PHP 8.1 #178

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,17 @@ int name##_unserialize( \
zend_ce_error, \
"Immutable objects may not be changed")

// https://bugs.php.net/bug.php?id=80816
#if PHP_VERSION_ID >= 80100
#define spl_ce_Aggregate zend_ce_aggregate
#define spl_ce_ArrayAccess zend_ce_arrayaccess
#define spl_ce_Countable zend_ce_countable
#define spl_ce_Iterator zend_ce_iterator
#define spl_ce_Serializable zend_ce_serializable
#define spl_ce_Stringable zend_ce_stringable
#define spl_ce_Traversable zend_ce_traversable
#endif

/**
*
*/
Expand Down
6 changes: 5 additions & 1 deletion src/php/arginfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,11 @@ ZEND_END_ARG_INFO()
{ (const char*)(zend_uintptr_t)(required_num_args), class_name, IS_OBJECT, pass_by_ref, allow_null, 0 },
#endif

#if PHP_VERSION_ID >= 80000
#if PHP_VERSION_ID >= 80100
#define DS_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(name, pass_by_ref, required_num_args, type, allow_null) \
static const zend_internal_arg_info arginfo_##name[] = { \
{ (const char*)(zend_uintptr_t)(required_num_args), ZEND_TYPE_INIT_CODE(type, allow_null, _ZEND_ARG_INFO_FLAGS(pass_by_ref, 0, 0)) },
#elif PHP_VERSION_ID >= 80000
#define DS_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(name, pass_by_ref, required_num_args, type, allow_null) \
static const zend_internal_arg_info arginfo_##name[] = { \
{ (const char*)(zend_uintptr_t)(required_num_args), ZEND_TYPE_INIT_CODE(type, allow_null, _ZEND_ARG_INFO_FLAGS(pass_by_ref, 0)) },
Expand Down