File tree Expand file tree Collapse file tree 1 file changed +13
-9
lines changed Expand file tree Collapse file tree 1 file changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -78,17 +78,21 @@ impl ZendType {
78
78
is_variadic : bool ,
79
79
allow_null : bool ,
80
80
) -> Option < Self > {
81
+ let mut flags = Self :: arg_info_flags ( pass_by_ref, is_variadic) ;
82
+ if allow_null {
83
+ flags |= _ZEND_TYPE_NULLABLE_BIT
84
+ }
85
+ cfg_if:: cfg_if! {
86
+ if #[ cfg( php83) ] {
87
+ flags |= crate :: ffi:: _ZEND_TYPE_LITERAL_NAME_BIT
88
+ } else {
89
+ flags |= crate :: ffi:: _ZEND_TYPE_NAME_BIT
90
+ }
91
+ }
92
+
81
93
Some ( Self {
82
94
ptr : std:: ffi:: CString :: new ( class_name) . ok ( ) ?. into_raw ( ) as * mut c_void ,
83
- type_mask : if cfg ! ( php83) {
84
- crate :: ffi:: _ZEND_TYPE_LITERAL_NAME_BIT
85
- } else {
86
- crate :: ffi:: _ZEND_TYPE_NAME_BIT
87
- } | ( if allow_null {
88
- _ZEND_TYPE_NULLABLE_BIT
89
- } else {
90
- 0
91
- } ) | Self :: arg_info_flags ( pass_by_ref, is_variadic) ,
95
+ type_mask : flags,
92
96
} )
93
97
}
94
98
You can’t perform that action at this time.
0 commit comments