File tree Expand file tree Collapse file tree 1 file changed +6
-15
lines changed Expand file tree Collapse file tree 1 file changed +6
-15
lines changed Original file line number Diff line number Diff line change @@ -238,22 +238,13 @@ impl ZObject {
238
238
impl Clone for ZObject {
239
239
fn clone ( & self ) -> Self {
240
240
unsafe {
241
- // TODO Get the handle clone_obj of object.
242
241
let ptr = {
243
- #[ cfg( phper_major_version = "7" ) ]
244
- {
245
- let mut zv = ZVal :: default ( ) ;
246
- phper_zval_obj ( zv. as_mut_ptr ( ) , self . as_ptr ( ) as * mut _ ) ;
247
- let handlers = phper_z_obj_ht_p ( zv. as_ptr ( ) ) ;
248
- match ( * handlers) . clone_obj {
249
- Some ( clone_obj) => clone_obj ( zv. as_mut_ptr ( ) ) ,
250
- None => zend_objects_clone_obj ( zv. as_mut_ptr ( ) ) ,
251
- }
252
- }
253
- #[ cfg( phper_major_version = "8" ) ]
254
- {
255
- // zend_objects_clone_obj(self.as_ptr() as *mut _).cast()
256
- todo ! ( )
242
+ let mut zv = ZVal :: default ( ) ;
243
+ phper_zval_obj ( zv. as_mut_ptr ( ) , self . as_ptr ( ) as * mut _ ) ;
244
+ let handlers = phper_z_obj_ht_p ( zv. as_ptr ( ) ) ;
245
+ match ( * handlers) . clone_obj {
246
+ Some ( clone_obj) => clone_obj ( zv. as_mut_ptr ( ) ) ,
247
+ None => zend_objects_clone_obj ( zv. as_mut_ptr ( ) ) ,
257
248
}
258
249
} ;
259
250
Self :: from_raw ( ptr)
You can’t perform that action at this time.
0 commit comments