diff options
Diffstat (limited to 'Zend')
-rw-r--r-- | Zend/zend_API.h | 4 | ||||
-rw-r--r-- | Zend/zend_closures.stub.php | 7 | ||||
-rw-r--r-- | Zend/zend_types.h | 6 |
3 files changed, 15 insertions, 2 deletions
diff --git a/Zend/zend_API.h b/Zend/zend_API.h index 85c2d495a6..7f33d61f0c 100644 --- a/Zend/zend_API.h +++ b/Zend/zend_API.h @@ -128,6 +128,10 @@ typedef struct _zend_fcall_info_cache { static const zend_internal_arg_info name[] = { \ { (const char*)(zend_uintptr_t)(required_num_args), ZEND_TYPE_INIT_MASK(type | _ZEND_ARG_INFO_FLAGS(return_reference, 0)) }, +#define ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(name, return_reference, required_num_args, class_name, type) \ + static const zend_internal_arg_info name[] = { \ + { (const char*)(zend_uintptr_t)(required_num_args), ZEND_TYPE_INIT_CLASS_CONST_MASK(#class_name, type | _ZEND_ARG_INFO_FLAGS(return_reference, 0)) }, + #define ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(name, return_reference, required_num_args, type, allow_null) \ static const zend_internal_arg_info name[] = { \ { (const char*)(zend_uintptr_t)(required_num_args), ZEND_TYPE_INIT_CODE(type, allow_null, _ZEND_ARG_INFO_FLAGS(return_reference, 0)) }, diff --git a/Zend/zend_closures.stub.php b/Zend/zend_closures.stub.php index cc859b2b10..ad15daa526 100644 --- a/Zend/zend_closures.stub.php +++ b/Zend/zend_closures.stub.php @@ -12,6 +12,9 @@ Class Closure function call(object $newthis, ...$parameters) {} - /** @return Closure */ - function fromCallable(callable $callable) {} + /** + * @param callable $callable Not a proper type annotation due to bug #78770 + * @return Closure + */ + function fromCallable($callable) {} } diff --git a/Zend/zend_types.h b/Zend/zend_types.h index 4bfe335e0a..3ff94eb574 100644 --- a/Zend/zend_types.h +++ b/Zend/zend_types.h @@ -269,6 +269,9 @@ typedef struct { { (void *) (ptr), \ (type_kind) | ((allow_null) ? _ZEND_TYPE_NULLABLE_BIT : 0) | (extra_flags) } +#define ZEND_TYPE_INIT_PTR_MASK(ptr, type_mask) \ + { (void *) (ptr), (type_mask) } + #define ZEND_TYPE_INIT_CE(_ce, allow_null, extra_flags) \ ZEND_TYPE_INIT_PTR(_ce, _ZEND_TYPE_CE_BIT, allow_null, extra_flags) @@ -278,6 +281,9 @@ typedef struct { #define ZEND_TYPE_INIT_CLASS_CONST(class_name, allow_null, extra_flags) \ ZEND_TYPE_INIT_PTR(class_name, _ZEND_TYPE_NAME_BIT, allow_null, extra_flags) +#define ZEND_TYPE_INIT_CLASS_CONST_MASK(class_name, type_mask) \ + ZEND_TYPE_INIT_PTR_MASK(class_name, _ZEND_TYPE_NAME_BIT | (type_mask)) + typedef union _zend_value { zend_long lval; /* long value */ double dval; /* double value */ |