@@ -122,6 +122,10 @@ mod imp {
122
122
pub const fn new ( ptr : * mut u8 ) -> Self {
123
123
Self ( ptr)
124
124
}
125
+
126
+ pub const fn raw ( self ) -> * mut u8 {
127
+ self . 0
128
+ }
125
129
}
126
130
}
127
131
@@ -157,6 +161,10 @@ mod imp {
157
161
let offset: usize = addr - image_base;
158
162
Self ( offset as u32 )
159
163
}
164
+
165
+ pub const fn raw ( self ) -> u32 {
166
+ self . 0
167
+ }
160
168
}
161
169
}
162
170
@@ -319,23 +327,23 @@ pub unsafe fn panic(data: Box<dyn Any + Send>) -> u32 {
319
327
// express more operations in statics (and we may never be able to).
320
328
atomic_store_seqcst (
321
329
addr_of_mut ! ( THROW_INFO . pmfnUnwind) . cast ( ) ,
322
- ptr_t:: new ( exception_cleanup as * mut u8 ) ,
330
+ ptr_t:: new ( exception_cleanup as * mut u8 ) . raw ( ) ,
323
331
) ;
324
332
atomic_store_seqcst (
325
333
addr_of_mut ! ( THROW_INFO . pCatchableTypeArray) . cast ( ) ,
326
- ptr_t:: new ( addr_of_mut ! ( CATCHABLE_TYPE_ARRAY ) . cast ( ) ) ,
334
+ ptr_t:: new ( addr_of_mut ! ( CATCHABLE_TYPE_ARRAY ) . cast ( ) ) . raw ( ) ,
327
335
) ;
328
336
atomic_store_seqcst (
329
337
addr_of_mut ! ( CATCHABLE_TYPE_ARRAY . arrayOfCatchableTypes[ 0 ] ) . cast ( ) ,
330
- ptr_t:: new ( addr_of_mut ! ( CATCHABLE_TYPE ) . cast ( ) ) ,
338
+ ptr_t:: new ( addr_of_mut ! ( CATCHABLE_TYPE ) . cast ( ) ) . raw ( ) ,
331
339
) ;
332
340
atomic_store_seqcst (
333
341
addr_of_mut ! ( CATCHABLE_TYPE . pType) . cast ( ) ,
334
- ptr_t:: new ( addr_of_mut ! ( TYPE_DESCRIPTOR ) . cast ( ) ) ,
342
+ ptr_t:: new ( addr_of_mut ! ( TYPE_DESCRIPTOR ) . cast ( ) ) . raw ( ) ,
335
343
) ;
336
344
atomic_store_seqcst (
337
345
addr_of_mut ! ( CATCHABLE_TYPE . copyFunction) . cast ( ) ,
338
- ptr_t:: new ( exception_copy as * mut u8 ) ,
346
+ ptr_t:: new ( exception_copy as * mut u8 ) . raw ( ) ,
339
347
) ;
340
348
341
349
extern "system-unwind" {
0 commit comments