File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -105,6 +105,36 @@ pub const JS_TAG_CATCH_OFFSET: _bindgen_ty_1 = 5;
105
105
pub const JS_TAG_EXCEPTION : _bindgen_ty_1 = 6 ;
106
106
pub const JS_TAG_FLOAT64 : _bindgen_ty_1 = 7 ;
107
107
pub type _bindgen_ty_1 = :: std:: os:: raw:: c_int ;
108
+ #[ repr( C ) ]
109
+ #[ derive( Debug , Copy , Clone ) ]
110
+ pub struct JSRefCountHeader {
111
+ pub ref_count : :: std:: os:: raw:: c_int ,
112
+ }
113
+ #[ test]
114
+ fn bindgen_test_layout_JSRefCountHeader ( ) {
115
+ const UNINIT : :: std:: mem:: MaybeUninit < JSRefCountHeader > = :: std:: mem:: MaybeUninit :: uninit ( ) ;
116
+ let ptr = UNINIT . as_ptr ( ) ;
117
+ assert_eq ! (
118
+ :: std:: mem:: size_of:: <JSRefCountHeader >( ) ,
119
+ 4usize ,
120
+ concat!( "Size of: " , stringify!( JSRefCountHeader ) )
121
+ ) ;
122
+ assert_eq ! (
123
+ :: std:: mem:: align_of:: <JSRefCountHeader >( ) ,
124
+ 4usize ,
125
+ concat!( "Alignment of " , stringify!( JSRefCountHeader ) )
126
+ ) ;
127
+ assert_eq ! (
128
+ unsafe { :: std:: ptr:: addr_of!( ( * ptr) . ref_count) as usize - ptr as usize } ,
129
+ 0usize ,
130
+ concat!(
131
+ "Offset of field: " ,
132
+ stringify!( JSRefCountHeader ) ,
133
+ "::" ,
134
+ stringify!( ref_count)
135
+ )
136
+ ) ;
137
+ }
108
138
pub type JSValue = u64 ;
109
139
pub type JSCFunction = :: std:: option:: Option <
110
140
unsafe extern "C" fn (
You can’t perform that action at this time.
0 commit comments