From: Philippe Proulx Date: Wed, 23 Nov 2016 05:49:09 +0000 (-0500) Subject: API doc: add missing @postrefcountsame conditions X-Git-Tag: v2.0.0-pre1~666 X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=c2f29fb98a1e9088434fe8872d68695afd8e9dd3 API doc: add missing @postrefcountsame conditions Signed-off-by: Philippe Proulx Signed-off-by: Jérémie Galarneau --- diff --git a/include/babeltrace/ctf-ir/event-class.h b/include/babeltrace/ctf-ir/event-class.h index f446cc2c..12e31fcb 100644 --- a/include/babeltrace/ctf-ir/event-class.h +++ b/include/babeltrace/ctf-ir/event-class.h @@ -155,6 +155,7 @@ bt_ctf_stream_class_add_event_class(). added to a stream class yet or on error. @prenotnull{event_class} +@postrefcountsame{event_class} @postsuccessrefcountretinc @sa bt_ctf_stream_class_add_event_class(): Add an event class to @@ -369,6 +370,7 @@ extern int bt_ctf_event_class_set_attribute( or \c NULL on error. @prenotnull{event_class} +@postrefcountsame{event_class} @postsuccessrefcountretinc @sa bt_ctf_event_class_set_context_type(): Sets the context field @@ -413,6 +415,7 @@ extern int bt_ctf_event_class_set_context_type( or \c NULL on error. @prenotnull{event_class} +@postrefcountsame{event_class} @postsuccessrefcountretinc @sa bt_ctf_event_class_set_payload_type(): Sets the payload field @@ -532,7 +535,6 @@ bt_ctf_field_type_structure_get_field_type_by_name(). @prenotnull{name} @postrefcountsame{event_class} @postsuccessrefcountretinc - */ extern struct bt_ctf_field_type *bt_ctf_event_class_get_field_by_name( struct bt_ctf_event_class *event_class, const char *name); diff --git a/include/babeltrace/ctf-ir/event.h b/include/babeltrace/ctf-ir/event.h index 6d45e33f..850f4b7d 100644 --- a/include/babeltrace/ctf-ir/event.h +++ b/include/babeltrace/ctf-ir/event.h @@ -164,6 +164,7 @@ create the event object in the first place with bt_ctf_event_create(). or \c NULL on error. @prenotnull{event} +@postrefcountsame{event} @postsuccessrefcountretinc */ extern struct bt_ctf_event_class *bt_ctf_event_get_class( @@ -182,6 +183,7 @@ This function returns a reference to the event class which was set to \p event or on error. @prenotnull{event} +@postrefcountsame{event} @postsuccessrefcountretinc @sa bt_ctf_event_set_packet(): Associates a given event to a given @@ -230,6 +232,7 @@ extern int bt_ctf_event_set_packet(struct bt_ctf_event *event, @returns Parent stream of \p event, or \c NULL on error. @prenotnull{event} +@postrefcountsame{event} @postsuccessrefcountretinc */ extern struct bt_ctf_stream *bt_ctf_event_get_stream( @@ -253,6 +256,7 @@ extern struct bt_ctf_stream *bt_ctf_event_get_stream( field is not set or on error. @prenotnull{event} +@postrefcountsame{event} @postsuccessrefcountretinc @sa bt_ctf_event_get_header(): Sets the stream event header @@ -301,6 +305,7 @@ extern int bt_ctf_event_set_header(struct bt_ctf_event *event, field is not set or on error. @prenotnull{event} +@postrefcountsame{event} @postsuccessrefcountretinc @sa bt_ctf_event_set_stream_event_context(): Sets the stream event @@ -348,6 +353,7 @@ extern int bt_ctf_event_set_stream_event_context(struct bt_ctf_event *event, the event context field is not set or on error. @prenotnull{event} +@postrefcountsame{event} @postsuccessrefcountretinc @sa bt_ctf_event_set_event_context(): Sets the event context field of a @@ -394,6 +400,7 @@ extern int bt_ctf_event_set_event_context(struct bt_ctf_event *event, the event payload field is not set or on error. @prenotnull{event} +@postrefcountsame{event} @postsuccessrefcountretinc @sa bt_ctf_event_set_payload_field(): Sets the event payload field of a diff --git a/include/babeltrace/ctf-ir/packet.h b/include/babeltrace/ctf-ir/packet.h index 839895fc..81ca4c20 100644 --- a/include/babeltrace/ctf-ir/packet.h +++ b/include/babeltrace/ctf-ir/packet.h @@ -128,6 +128,7 @@ the packet object in the first place with bt_ctf_packet_create(). @returns Parent stream of \p packet, or \c NULL on error. @prenotnull{packet} +@postrefcountsame{packet} @postsuccessrefcountretinc */ extern struct bt_ctf_stream *bt_ctf_packet_get_stream( @@ -151,6 +152,7 @@ extern struct bt_ctf_stream *bt_ctf_packet_get_stream( field is not set or on error. @prenotnull{packet} +@postrefcountsame{packet} @postsuccessrefcountretinc @sa bt_ctf_packet_set_header(): Sets the trace packet header @@ -199,6 +201,7 @@ extern int bt_ctf_packet_set_header( field is not set or on error. @prenotnull{packet} +@postrefcountsame{packet} @postsuccessrefcountretinc @sa bt_ctf_packet_set_context(): Sets the stream packet context diff --git a/include/babeltrace/ctf-ir/stream-class.h b/include/babeltrace/ctf-ir/stream-class.h index 1959d956..40dbf819 100644 --- a/include/babeltrace/ctf-ir/stream-class.h +++ b/include/babeltrace/ctf-ir/stream-class.h @@ -187,6 +187,7 @@ bt_ctf_trace_add_stream_class(). added to a trace class yet or on error. @prenotnull{stream_class} +@postrefcountsame{stream_class} @postsuccessrefcountretinc @sa bt_ctf_trace_add_stream_class(): Add a stream class to @@ -298,6 +299,7 @@ extern int bt_ctf_stream_class_set_id( or \c NULL on error. @prenotnull{stream_class} +@postrefcountsame{stream_class} @postsuccessrefcountretinc @sa bt_ctf_stream_class_set_packet_context_type(): Sets the packet @@ -342,6 +344,7 @@ extern int bt_ctf_stream_class_set_packet_context_type( or \c NULL on error. @prenotnull{stream_class} +@postrefcountsame{stream_class} @postsuccessrefcountretinc @sa bt_ctf_stream_class_set_event_header_type(): Sets the event @@ -387,6 +390,7 @@ extern int bt_ctf_stream_class_set_event_header_type( \p stream_class, or \c NULL on error. @prenotnull{stream_class} +@postrefcountsame{stream_class} @postsuccessrefcountretinc @sa bt_ctf_stream_class_set_event_context_type(): Sets the per-stream diff --git a/include/babeltrace/ctf-ir/stream.h b/include/babeltrace/ctf-ir/stream.h index 0d6d5606..75e34d48 100644 --- a/include/babeltrace/ctf-ir/stream.h +++ b/include/babeltrace/ctf-ir/stream.h @@ -155,6 +155,7 @@ bt_ctf_stream_create(). or \c NULL on error. @prenotnull{stream} +@postrefcountsame{stream} @postsuccessrefcountretinc */ extern struct bt_ctf_stream_class *bt_ctf_stream_get_class( diff --git a/include/babeltrace/ctf-ir/trace.h b/include/babeltrace/ctf-ir/trace.h index c7322b81..93878ebc 100644 --- a/include/babeltrace/ctf-ir/trace.h +++ b/include/babeltrace/ctf-ir/trace.h @@ -481,6 +481,7 @@ extern int bt_ctf_trace_set_environment_field_string( or \c NULL on error. @prenotnull{trace_class} +@postrefcountsame{trace_class} @postsuccessrefcountretinc @sa bt_ctf_trace_set_packet_header_type(): Sets the packet @@ -729,6 +730,7 @@ is modified, \p listener is called with the new element and with @prenotnull{trace_class} @prenotnull{listener} +@postrefcountsame{trace_class} */ extern int bt_ctf_trace_add_listener(struct bt_ctf_trace *trace_class, bt_ctf_listener_cb listener, void *data); diff --git a/include/babeltrace/ctf-ir/visitor.h b/include/babeltrace/ctf-ir/visitor.h index 293d305d..014333a6 100644 --- a/include/babeltrace/ctf-ir/visitor.h +++ b/include/babeltrace/ctf-ir/visitor.h @@ -149,11 +149,16 @@ enum bt_ctf_object_type bt_ctf_object_get_type(struct bt_ctf_object *object); @brief Returns the CTF IR object wrapped by the CTF IR object wrapper \p object. +The reference count of \p object is \em not incremented by this +function. On success, you must call bt_get() on the return value to +have your own reference. + @param[in] object Object wrapper of which to get the wrapped CTF IR object. @returns CTF IR object wrapped by \p object. @prenotnull{object} +@post The reference count of the returned object is not modified. @sa bt_ctf_object_get_type(): Returns the type of a given CTF IR object wrapper.