@@ -1397,19 +1397,19 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_argument_value_error(uint32_t arg_num
1397
1397
#define Z_PARAM_CLASS (dest ) \
1398
1398
Z_PARAM_CLASS_EX(dest, 0, 0)
1399
1399
1400
- #define Z_PARAM_CLASS_NAME_OR_OBJ_EX (dest_str , dest_object , allow_null ) \
1400
+ #define Z_PARAM_CLASS_NAME_OR_OBJ_EX (dest , allow_null ) \
1401
1401
Z_PARAM_PROLOGUE(0, 0); \
1402
- if (UNEXPECTED(!zend_parse_arg_class_name_or_obj(_arg, &dest_str, &dest_object , _i, allow_null))) { \
1402
+ if (UNEXPECTED(!zend_parse_arg_class_name_or_obj(_arg, &dest , _i, allow_null))) { \
1403
1403
_expected_type = allow_null ? Z_EXPECTED_CLASS_NAME_OR_OBJECT_OR_NULL : Z_EXPECTED_CLASS_NAME_OR_OBJECT; \
1404
1404
_error_code = ZPP_ERROR_WRONG_ARG; \
1405
1405
break; \
1406
1406
}
1407
1407
1408
- #define Z_PARAM_CLASS_NAME_OR_OBJ (dest_str , dest_object ) \
1409
- Z_PARAM_CLASS_NAME_OR_OBJ_EX(dest_str, dest_object , 0);
1408
+ #define Z_PARAM_CLASS_NAME_OR_OBJ (dest ) \
1409
+ Z_PARAM_CLASS_NAME_OR_OBJ_EX(dest , 0);
1410
1410
1411
- #define Z_PARAM_CLASS_NAME_OR_OBJ_OR_NULL (dest_str , dest_object ) \
1412
- Z_PARAM_CLASS_NAME_OR_OBJ_EX(dest_str, dest_object , 1);
1411
+ #define Z_PARAM_CLASS_NAME_OR_OBJ_OR_NULL (dest ) \
1412
+ Z_PARAM_CLASS_NAME_OR_OBJ_EX(dest , 1);
1413
1413
1414
1414
/* old "d" */
1415
1415
#define Z_PARAM_DOUBLE_EX2 (dest , is_null , check_null , deref , separate ) \
@@ -1955,22 +1955,18 @@ static zend_always_inline int zend_parse_arg_str_or_long(zval *arg, zend_string
1955
1955
}
1956
1956
1957
1957
static zend_always_inline int zend_parse_arg_class_name_or_obj (
1958
- zval * arg , zend_string * * dest_str , zend_object * * dest_object , int num , int allow_null
1958
+ zval * arg , zend_class_entry * * destination , int num , int allow_null
1959
1959
) {
1960
- zend_class_entry * class_entry ;
1960
+ if (EXPECTED (Z_TYPE_P (arg ) == IS_STRING )) {
1961
+ * destination = zend_lookup_class (Z_STR_P (arg ));
1961
1962
1962
- if (EXPECTED (Z_TYPE_P (arg ) == IS_STRING ) && (class_entry = zend_lookup_class (Z_STR_P (arg )))) {
1963
- * dest_str = class_entry -> name ;
1964
- * dest_object = NULL ;
1963
+ return * destination != NULL ;
1965
1964
} else if (EXPECTED (Z_TYPE_P (arg ) == IS_OBJECT )) {
1966
- * dest_str = NULL ;
1967
- * dest_object = Z_OBJ_P (arg );
1965
+ * destination = Z_OBJ_P (arg )-> ce ;
1968
1966
} else if (allow_null && EXPECTED (Z_TYPE_P (arg ) == IS_NULL )) {
1969
- * dest_str = NULL ;
1970
- * dest_object = NULL ;
1967
+ * destination = NULL ;
1971
1968
} else {
1972
- * dest_str = NULL ;
1973
- * dest_object = NULL ;
1969
+ * destination = NULL ;
1974
1970
return 0 ;
1975
1971
}
1976
1972
0 commit comments