Re: [PATCH] Remove bogus warning about vir$OBJECTGetConnect functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/04/2017 05:30 PM, Daniel P. Berrange wrote:
> The API docs for the various vir$OBJECTGetConnect functions
> contain a warning
> 
>   WARNING: When writing libvirt bindings in other languages, do
>   not use this function.  Instead, store the connection and
>   the domain object together.
> 
> There is no reason why language bindings should not use this
> method, and indeed the Perl, Python, and Go bindings all use
> these methods.
> 
> This warning was originally added back in
> 
>   commit 3edb4bc9fb1b451599df58420d61ffd73633cead
>   Author: Daniel Veillard <veillard@xxxxxxxxxx>
>   Date:   Tue Jul 24 15:32:55 2007 +0000
> 
>     * libvirt.spec.in NEWS docs/* po/*: preparing release 0.3.1
>     * src/libvirt.c python/generator.py: some cleanup and warnings
>       from Richard W.M. Jones
> 
> IIUC, the rational was that these APIs do not need to be
> directly exposed to the non-C language, as the language
> can expose the same concept itself by storing the original
> virConnectPtr object alongside the virDomainPtr.  There's
> no reason to mandate such an approach though - it is valid
> for languages to expose this directly if that suits their
> needs better.
> 
> Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
> ---
>  src/libvirt-domain-snapshot.c | 6 ------
>  src/libvirt-domain.c          | 4 ----
>  src/libvirt-interface.c       | 4 ----
>  src/libvirt-network.c         | 4 ----
>  src/libvirt-secret.c          | 3 ---
>  src/libvirt-storage.c         | 8 --------
>  6 files changed, 29 deletions(-)

ACK

Michal

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



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux