File tree Expand file tree Collapse file tree 1 file changed +11
-24
lines changed
Expand file tree Collapse file tree 1 file changed +11
-24
lines changed Original file line number Diff line number Diff line change @@ -78,31 +78,18 @@ impl ZendType {
7878 is_variadic : bool ,
7979 allow_null : bool ,
8080 ) -> Option < Self > {
81- cfg_if:: cfg_if! {
82- if #[ cfg( php83) ] {
83- Some ( Self {
84- ptr: std:: ffi:: CString :: new( class_name) . ok( ) ?. into_raw( ) as * mut c_void,
85- type_mask: crate :: ffi:: _ZEND_TYPE_LITERAL_NAME_BIT
86- | ( if allow_null {
87- _ZEND_TYPE_NULLABLE_BIT
88- } else {
89- 0
90- } )
91- | Self :: arg_info_flags( pass_by_ref, is_variadic) ,
92- } )
81+ Some ( Self {
82+ 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
9385 } else {
94- Some ( Self {
95- ptr: crate :: types:: ZendStr :: new( class_name, true ) . into_raw( ) . as_ptr( ) as * mut c_void,
96- type_mask: crate :: ffi:: _ZEND_TYPE_NAME_BIT
97- | ( if allow_null {
98- _ZEND_TYPE_NULLABLE_BIT
99- } else {
100- 0
101- } )
102- | Self :: arg_info_flags( pass_by_ref, is_variadic) ,
103- } )
104- }
105- }
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) ,
92+ } )
10693 }
10794
10895 /// Attempts to create a zend type for a primitive PHP type.
You can’t perform that action at this time.
0 commit comments