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> {
167
167
( ptr as * mut Self ) . as_mut ( ) ?
168
168
} ;
169
169
170
- if ptr. std . is_instance :: < T > ( ) {
170
+ if ptr. std . instance_of ( T :: get_metadata ( ) . ce ( ) ) {
171
171
Some ( ptr)
172
172
} else {
173
173
None
Original file line number Diff line number Diff line change @@ -52,13 +52,13 @@ impl ZendObjectHandlers {
52
52
}
53
53
54
54
unsafe extern "C" fn free_obj < T : RegisteredClass > ( object : * mut ZendObject ) {
55
- object
55
+ let obj = object
56
56
. as_mut ( )
57
57
. 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`" ) ;
59
59
60
60
// Manually drop the object as we don't want to free the underlying memory.
61
-
61
+ ptr :: drop_in_place ( & mut obj . obj ) ;
62
62
63
63
zend_object_std_dtor ( object)
64
64
}
You can’t perform that action at this time.
0 commit comments