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 {
7878 is_variadic : bool ,
7979 allow_null : bool ,
8080 ) -> 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+
8193 Some ( Self {
8294 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,
9296 } )
9397 }
9498
You can’t perform that action at this time.
0 commit comments