]> xenbits.xensource.com Git - libvirt.git/commitdiff
Remove bogus warning about vir$OBJECTGetConnect functions
authorDaniel P. Berrange <berrange@redhat.com>
Fri, 2 Jun 2017 12:09:49 +0000 (13:09 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Mon, 7 Aug 2017 12:39:28 +0000 (13:39 +0100)
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@redhat.com>
  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@redhat.com>
src/libvirt-domain-snapshot.c
src/libvirt-domain.c
src/libvirt-interface.c
src/libvirt-network.c
src/libvirt-secret.c
src/libvirt-storage.c

index b7c566fecb50c57fc6a7bf84b5516a44370f4e87..953a586e5b676ae8c97c659b4ca7c31e19e0024c 100644 (file)
@@ -57,9 +57,6 @@ virDomainSnapshotGetName(virDomainSnapshotPtr snapshot)
  * reference counter on the domain is not increased by this
  * call.
  *
- * WARNING: When writing libvirt bindings in other languages, do not use this
- * function.  Instead, store the domain and the snapshot object together.
- *
  * Returns the domain or NULL.
  */
 virDomainPtr
@@ -83,9 +80,6 @@ virDomainSnapshotGetDomain(virDomainSnapshotPtr snapshot)
  * reference counter on the connection is not increased by this
  * call.
  *
- * WARNING: When writing libvirt bindings in other languages, do not use this
- * function.  Instead, store the connection and the snapshot object together.
- *
  * Returns the connection or NULL.
  */
 virConnectPtr
index 4033ae8e65febb7fb7eed5b33db5729f5d32004e..87fca29c4d44fcc6fe148e33a93b9710038d054f 100644 (file)
@@ -115,10 +115,6 @@ virConnectNumOfDomains(virConnectPtr conn)
  * reference counter on the connection is not increased by this
  * call.
  *
- * WARNING: When writing libvirt bindings in other languages, do
- * not use this function.  Instead, store the connection and
- * the domain object together.
- *
  * Returns the virConnectPtr or NULL in case of failure.
  */
 virConnectPtr
index 3d1a5ff8dbbb25f4cbf1ffe37e59afe0eba95d48..7c8996c584deee749fc0afd4b438c1362a011886 100644 (file)
@@ -35,10 +35,6 @@ VIR_LOG_INIT("libvirt.interface");
  * reference counter on the connection is not increased by this
  * call.
  *
- * WARNING: When writing libvirt bindings in other languages, do
- * not use this function.  Instead, store the connection and
- * the interface object together.
- *
  * Returns the virConnectPtr or NULL in case of failure.
  */
 virConnectPtr
index 3136f27eea48f79ddbfe1da1f3970427e8d30e13..5c5a0ee225df7024da691aa7bae5e9406beac412 100644 (file)
@@ -36,10 +36,6 @@ VIR_LOG_INIT("libvirt.network");
  * reference counter on the connection is not increased by this
  * call.
  *
- * WARNING: When writing libvirt bindings in other languages, do
- * not use this function.  Instead, store the connection and
- * the network object together.
- *
  * Returns the virConnectPtr or NULL in case of failure.
  */
 virConnectPtr
index 8a99c8c26453cd65fee942982839e19aaa2b65e4..d9244c252036c585aef5c1b6cec91bc03755c7f8 100644 (file)
@@ -34,9 +34,6 @@ VIR_LOG_INIT("libvirt.secret");
  * Provides the connection pointer associated with a secret.  The reference
  * counter on the connection is not increased by this call.
  *
- * WARNING: When writing libvirt bindings in other languages, do not use this
- * function.  Instead, store the connection and the secret object together.
- *
  * Returns the virConnectPtr or NULL in case of failure.
  */
 virConnectPtr
index 35f9926d524e8afb7a02a7bcad6ba91ebf32110b..2cefc3c91cb6169f05b6c5ba80bbbd87db23399b 100644 (file)
@@ -36,10 +36,6 @@ VIR_LOG_INIT("libvirt.storage");
  * reference counter on the connection is not increased by this
  * call.
  *
- * WARNING: When writing libvirt bindings in other languages, do
- * not use this function.  Instead, store the connection and
- * the pool object together.
- *
  * Returns the virConnectPtr or NULL in case of failure.
  */
 virConnectPtr
@@ -1254,10 +1250,6 @@ virStoragePoolListVolumes(virStoragePoolPtr pool,
  * reference counter on the connection is not increased by this
  * call.
  *
- * WARNING: When writing libvirt bindings in other languages, do
- * not use this function.  Instead, store the connection and
- * the volume object together.
- *
  * Returns the virConnectPtr or NULL in case of failure.
  */
 virConnectPtr