File tree 1 file changed +4
-4
lines changed 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -57,11 +57,11 @@ type OnceBox<T> = once_cell::unsync::OnceCell<Box<T>>;
57
57
struct Erased ;
58
58
59
59
struct PyObjVTable {
60
- drop_dealloc : unsafe fn ( & mut PyObject ) ,
60
+ drop_dealloc : unsafe fn ( * mut PyObject ) ,
61
61
debug : unsafe fn ( & PyObject , & mut fmt:: Formatter ) -> fmt:: Result ,
62
62
}
63
- unsafe fn drop_dealloc_obj < T : PyObjectPayload > ( x : & mut PyObject ) {
64
- Box :: from_raw ( x as * mut PyObject as * mut PyInner < T > ) ;
63
+ unsafe fn drop_dealloc_obj < T : PyObjectPayload > ( x : * mut PyObject ) {
64
+ Box :: from_raw ( x as * mut PyInner < T > ) ;
65
65
}
66
66
unsafe fn debug_obj < T : PyObjectPayload > ( x : & PyObject , f : & mut fmt:: Formatter ) -> fmt:: Result {
67
67
let x = & * ( x as * const PyObject as * const PyInner < T > ) ;
@@ -683,7 +683,7 @@ impl PyObjectRef {
683
683
}
684
684
685
685
let drop_dealloc = self . 0 . vtable . drop_dealloc ;
686
- unsafe { drop_dealloc ( self . ptr . as_mut ( ) ) }
686
+ unsafe { drop_dealloc ( self . ptr . as_ptr ( ) ) }
687
687
}
688
688
}
689
689
You can’t perform that action at this time.
0 commit comments