doc: bt_field_class...get_mapping_labels...(): clarify RV's validity
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 12 Mar 2020 17:33:09 +0000 (13:33 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 12 Mar 2020 17:43:27 +0000 (13:43 -0400)
The label array which
bt_field_class_enumeration_unsigned_get_mapping_labels_for_value() and
bt_field_class_enumeration_signed_get_mapping_labels_for_value() return
remains valid as long as:

* The enumeration field class is not modified.

* You don't call the same function again with the same enumeration
  field class.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: I7b197ab5e176c77f4418d23b12e194c6477e5cf8
Reviewed-on: https://review.lttng.org/c/babeltrace/+/3226

include/babeltrace2/trace-ir/field-class.h

index 0aab9682e0383d637775763fd3e65153153010b1..1f907b7ff9f22640d068709eb04f6598953064f1 100644 (file)
@@ -2320,7 +2320,10 @@ On success, if there's no mapping ranges containing the value
     The number of labels in \bt_p{*labels} is \bt_p{*count}.
 
     The array is owned by \bt_p{field_class} and remains valid as long
-    as \bt_p{field_class} is not modified.
+    as:
+
+    - \bt_p{field_class} is not modified.
+    - You don't call this function again with \bt_p{field_class}.
     @endparblock
 @param[out] count
     <strong>On success</strong>, \bt_p{*count} is the number of labels
@@ -2582,7 +2585,10 @@ On success, if there's no mapping ranges containing the value
     The number of labels in \bt_p{*labels} is \bt_p{*count}.
 
     The array is owned by \bt_p{field_class} and remains valid as long
-    as \bt_p{field_class} is not modified.
+    as:
+
+    - \bt_p{field_class} is not modified.
+    - You don't call this function again with \bt_p{field_class}.
     @endparblock
 @param[out] count
     <strong>On success</strong>, \bt_p{*count} is the number of labels
This page took 0.025715 seconds and 4 git commands to generate.