Skip to content

Commit

Permalink
hwloc/diff.h: improve the documentation about return values
Browse files Browse the repository at this point in the history
Refs #578

Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
  • Loading branch information
bgoglin committed Apr 27, 2023
1 parent c46a465 commit dbcbce3
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion include/hwloc/diff.h
@@ -1,5 +1,5 @@
/*
* Copyright © 2013-2020 Inria. All rights reserved.
* Copyright © 2013-2023 Inria. All rights reserved.
* See COPYING in top-level directory.
*/

Expand Down Expand Up @@ -222,6 +222,8 @@ enum hwloc_topology_diff_apply_flags_e {
HWLOC_DECLSPEC int hwloc_topology_diff_apply(hwloc_topology_t topology, hwloc_topology_diff_t diff, unsigned long flags);

/** \brief Destroy a list of topology differences.
*
* \return 0.
*/
HWLOC_DECLSPEC int hwloc_topology_diff_destroy(hwloc_topology_diff_t diff);

Expand All @@ -233,6 +235,8 @@ HWLOC_DECLSPEC int hwloc_topology_diff_destroy(hwloc_topology_diff_t diff);
* This identifier is usually the name of the other XML file
* that contains the reference topology.
*
* \return 0 on success, -1 on error.
*
* \note the pointer returned in refname should later be freed
* by the caller.
*/
Expand All @@ -246,6 +250,8 @@ HWLOC_DECLSPEC int hwloc_topology_diff_load_xml(const char *xmlpath, hwloc_topol
* This identifier is usually the name of the other XML file
* that contains the reference topology.
* This attribute is given back when reading the diff from XML.
*
* \return 0 on success, -1 on error.
*/
HWLOC_DECLSPEC int hwloc_topology_diff_export_xml(hwloc_topology_diff_t diff, const char *refname, const char *xmlpath);

Expand All @@ -257,6 +263,8 @@ HWLOC_DECLSPEC int hwloc_topology_diff_export_xml(hwloc_topology_diff_t diff, co
* This identifier is usually the name of the other XML file
* that contains the reference topology.
*
* \return 0 on success, -1 on error.
*
* \note the pointer returned in refname should later be freed
* by the caller.
*/
Expand All @@ -274,6 +282,8 @@ HWLOC_DECLSPEC int hwloc_topology_diff_load_xmlbuffer(const char *xmlbuffer, int
* The returned buffer ends with a \0 that is included in the returned
* length.
*
* \return 0 on success, -1 on error.
*
* \note The XML buffer should later be freed with hwloc_free_xmlbuffer().
*/
HWLOC_DECLSPEC int hwloc_topology_diff_export_xmlbuffer(hwloc_topology_diff_t diff, const char *refname, char **xmlbuffer, int *buflen);
Expand Down

0 comments on commit dbcbce3

Please sign in to comment.