File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -167,7 +167,7 @@ impl<T: RegisteredClass> ZendClassObject<T> {
167167 ( ptr as * mut Self ) . as_mut ( ) ?
168168 } ;
169169
170- if ptr. std . is_instance :: < T > ( ) {
170+ if ptr. std . instance_of ( T :: get_metadata ( ) . ce ( ) ) {
171171 Some ( ptr)
172172 } else {
173173 None
Original file line number Diff line number Diff line change @@ -52,13 +52,13 @@ impl ZendObjectHandlers {
5252 }
5353
5454 unsafe extern "C" fn free_obj < T : RegisteredClass > ( object : * mut ZendObject ) {
55- object
55+ let obj = object
5656 . as_mut ( )
5757 . and_then ( |obj| ZendClassObject :: < T > :: from_zend_obj_mut ( obj) )
58- . map ( |obj|ptr :: drop_in_place ( & mut obj . obj ) ) ;
58+ . expect ( "Invalid object pointer given for `free_obj`" ) ;
5959
6060 // Manually drop the object as we don't want to free the underlying memory.
61-
61+ ptr :: drop_in_place ( & mut obj . obj ) ;
6262
6363 zend_object_std_dtor ( object)
6464 }
You can’t perform that action at this time.
0 commit comments