2012/7/19 Ata E Husain Bohra <ata.hus...@hotmail.com>:
> Fix addresses two issues:
> 1. Fix generator code to allow deep copy operation for objects with
>    Dynamic_Cast capabilities.
> 2. Add missing deep copy routine to Long datatype.
> Signed-off-by: Ata E Husain Bohra <ata.hus...@hotmail.com>

True, deep copy + dynamic dispatch is broken. This combination wasn't
tested as no VI type used it until now.

> index 844fb65..8211c93 100644
> --- a/src/esx/esx_vi_types.c
> +++ b/src/esx/esx_vi_types.c
> @@ -549,6 +549,21 @@
>      }
>
>
> +#define ESX_VI__TEMPLATE__DEEPCOPY_DISPATCH(_actual_type, __type, _dispatch, 
>  \
> +                                            _error_return)                   
>  \
> +    switch (_actual_type) {                                                  
>  \
> +      _dispatch                                                              
>  \
> +                                                                             
>  \
> +      case esxVI_Type_##__type:                                              
>  \
> +        break;                                                               
>  \
> +                                                                             
>  \
> +      default:                                                               
>  \
> +        ESX_VI_ERROR(VIR_ERR_INTERNAL_ERROR,                                 
>  \
> +                     _("Call to %s for unexpected type '%s'"), __FUNCTION__, 
>  \
> +                     esxVI_Type_ToString(_actual_type));                     
>  \
> +        return _error_return;                                                
>  \
> +    }
> +

No need for this extra copy of the ESX_VI__TEMPLATE__DISPATCH macro,
I'll remove it before pushing.

ACK and pushed, thanks.

-- 
Matthias Bolte
http://photron.blogspot.com

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to