@@ -28,6 +28,7 @@ use crate::error::{Error, Result};
28
28
29
29
bitflags ! {
30
30
/// Flags used for setting the type of Zval.
31
+ #[ derive( PartialEq , Eq , PartialOrd , Ord , Hash , Debug , Clone , Copy ) ]
31
32
pub struct ZvalTypeFlags : u32 {
32
33
const Undef = IS_UNDEF ;
33
34
const Null = IS_NULL ;
@@ -45,13 +46,13 @@ bitflags! {
45
46
const Void = IS_VOID ;
46
47
const Ptr = IS_PTR ;
47
48
48
- const InternedStringEx = Self :: String . bits;
49
- const StringEx = Self :: String . bits | Self :: RefCounted . bits;
50
- const ArrayEx = Self :: Array . bits | Self :: RefCounted . bits | Self :: Collectable . bits;
51
- const ObjectEx = Self :: Object . bits | Self :: RefCounted . bits | Self :: Collectable . bits;
52
- const ResourceEx = Self :: Resource . bits | Self :: RefCounted . bits;
53
- const ReferenceEx = Self :: Reference . bits | Self :: RefCounted . bits;
54
- const ConstantAstEx = Self :: ConstantExpression . bits | Self :: RefCounted . bits;
49
+ const InternedStringEx = Self :: String . bits( ) ;
50
+ const StringEx = Self :: String . bits( ) | Self :: RefCounted . bits( ) ;
51
+ const ArrayEx = Self :: Array . bits( ) | Self :: RefCounted . bits( ) | Self :: Collectable . bits( ) ;
52
+ const ObjectEx = Self :: Object . bits( ) | Self :: RefCounted . bits( ) | Self :: Collectable . bits( ) ;
53
+ const ResourceEx = Self :: Resource . bits( ) | Self :: RefCounted . bits( ) ;
54
+ const ReferenceEx = Self :: Reference . bits( ) | Self :: RefCounted . bits( ) ;
55
+ const ConstantAstEx = Self :: ConstantExpression . bits( ) | Self :: RefCounted . bits( ) ;
55
56
56
57
const RefCounted = ( IS_TYPE_REFCOUNTED << Z_TYPE_FLAGS_SHIFT ) ;
57
58
const Collectable = ( IS_TYPE_COLLECTABLE << Z_TYPE_FLAGS_SHIFT ) ;
@@ -60,6 +61,7 @@ bitflags! {
60
61
61
62
bitflags ! {
62
63
/// Flags for building classes.
64
+ #[ derive( PartialEq , Eq , PartialOrd , Ord , Hash , Debug , Clone , Copy ) ]
63
65
pub struct ClassFlags : u32 {
64
66
const Final = ZEND_ACC_FINAL ;
65
67
const Abstract = ZEND_ACC_ABSTRACT ;
@@ -91,6 +93,7 @@ bitflags! {
91
93
92
94
bitflags ! {
93
95
/// Flags for building methods.
96
+ #[ derive( PartialEq , Eq , PartialOrd , Ord , Hash , Debug , Clone , Copy ) ]
94
97
pub struct MethodFlags : u32 {
95
98
const Public = ZEND_ACC_PUBLIC ;
96
99
const Protected = ZEND_ACC_PROTECTED ;
@@ -126,6 +129,7 @@ bitflags! {
126
129
127
130
bitflags ! {
128
131
/// Flags for building properties.
132
+ #[ derive( PartialEq , Eq , PartialOrd , Ord , Hash , Debug , Clone , Copy ) ]
129
133
pub struct PropertyFlags : u32 {
130
134
const Public = ZEND_ACC_PUBLIC ;
131
135
const Protected = ZEND_ACC_PROTECTED ;
@@ -138,6 +142,7 @@ bitflags! {
138
142
139
143
bitflags ! {
140
144
/// Flags for building constants.
145
+ #[ derive( PartialEq , Eq , PartialOrd , Ord , Hash , Debug , Clone , Copy ) ]
141
146
pub struct ConstantFlags : u32 {
142
147
const Public = ZEND_ACC_PUBLIC ;
143
148
const Protected = ZEND_ACC_PROTECTED ;
@@ -148,6 +153,7 @@ bitflags! {
148
153
149
154
bitflags ! {
150
155
/// Flags for building module global constants.
156
+ #[ derive( PartialEq , Eq , PartialOrd , Ord , Hash , Debug , Clone , Copy ) ]
151
157
pub struct GlobalConstantFlags : u32 {
152
158
const CaseSensitive = CONST_CS ;
153
159
const Persistent = CONST_PERSISTENT ;
@@ -158,6 +164,7 @@ bitflags! {
158
164
159
165
bitflags ! {
160
166
/// Represents the result of a function.
167
+ #[ derive( PartialEq , Eq , PartialOrd , Ord , Hash , Debug , Clone , Copy ) ]
161
168
pub struct ZendResult : i32 {
162
169
const Success = 0 ;
163
170
const Failure = -1 ;
0 commit comments