]> xenbits.xensource.com Git - libvirt.git/commitdiff
util: Add docs for virXMLProp string
authorPeter Krempa <pkrempa@redhat.com>
Thu, 21 Feb 2013 10:07:55 +0000 (11:07 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 27 Feb 2013 10:49:03 +0000 (11:49 +0100)
To avoid confusion about usage of this function explicitly document that
this function returns copy of the attribute string.

src/util/virxml.c

index 74f8bebfb90fec67523517b3c62e3212108ee436..aa55a338748b1353457f0554d8a93d2a3641e5c7 100644 (file)
@@ -468,6 +468,16 @@ virXPathLongLong(const char *xpath,
     return ret;
 }
 
+/**
+ * virXMLPropString:
+ * @node: XML dom node pointer
+ * @name: Name of the property (attribute) to get
+ *
+ * Convenience function to return copy of an attribute value of a XML node.
+ *
+ * Returns the property (attribute) value as string or NULL in case of failure.
+ * The caller is responsible for freeing the returned buffer.
+ */
 char *
 virXMLPropString(xmlNodePtr node,
                  const char *name)