Skip to content

Commit dbcbce3

Browse files
committed
hwloc/diff.h: improve the documentation about return values
Refs #578 Signed-off-by: Brice Goglin <[email protected]>
1 parent c46a465 commit dbcbce3

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

include/hwloc/diff.h

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright © 2013-2020 Inria. All rights reserved.
2+
* Copyright © 2013-2023 Inria. All rights reserved.
33
* See COPYING in top-level directory.
44
*/
55

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

224224
/** \brief Destroy a list of topology differences.
225+
*
226+
* \return 0.
225227
*/
226228
HWLOC_DECLSPEC int hwloc_topology_diff_destroy(hwloc_topology_diff_t diff);
227229

@@ -233,6 +235,8 @@ HWLOC_DECLSPEC int hwloc_topology_diff_destroy(hwloc_topology_diff_t diff);
233235
* This identifier is usually the name of the other XML file
234236
* that contains the reference topology.
235237
*
238+
* \return 0 on success, -1 on error.
239+
*
236240
* \note the pointer returned in refname should later be freed
237241
* by the caller.
238242
*/
@@ -246,6 +250,8 @@ HWLOC_DECLSPEC int hwloc_topology_diff_load_xml(const char *xmlpath, hwloc_topol
246250
* This identifier is usually the name of the other XML file
247251
* that contains the reference topology.
248252
* This attribute is given back when reading the diff from XML.
253+
*
254+
* \return 0 on success, -1 on error.
249255
*/
250256
HWLOC_DECLSPEC int hwloc_topology_diff_export_xml(hwloc_topology_diff_t diff, const char *refname, const char *xmlpath);
251257

@@ -257,6 +263,8 @@ HWLOC_DECLSPEC int hwloc_topology_diff_export_xml(hwloc_topology_diff_t diff, co
257263
* This identifier is usually the name of the other XML file
258264
* that contains the reference topology.
259265
*
266+
* \return 0 on success, -1 on error.
267+
*
260268
* \note the pointer returned in refname should later be freed
261269
* by the caller.
262270
*/
@@ -274,6 +282,8 @@ HWLOC_DECLSPEC int hwloc_topology_diff_load_xmlbuffer(const char *xmlbuffer, int
274282
* The returned buffer ends with a \0 that is included in the returned
275283
* length.
276284
*
285+
* \return 0 on success, -1 on error.
286+
*
277287
* \note The XML buffer should later be freed with hwloc_free_xmlbuffer().
278288
*/
279289
HWLOC_DECLSPEC int hwloc_topology_diff_export_xmlbuffer(hwloc_topology_diff_t diff, const char *refname, char **xmlbuffer, int *buflen);

0 commit comments

Comments
 (0)