documentation: improve misleading wording
authorVivienne Watermeier <vwatermeier@igalia.com>
Wed, 23 Feb 2022 16:39:18 +0000 (17:39 +0100)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Thu, 17 Mar 2022 11:56:37 +0000 (11:56 +0000)
The documentation for several gst_*_writable_structure functions stated
that they would never return NULL, without making clear that the passed
object is required to be writable. This changes the wording in those
cases to make that requirement more clear.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1784>

subprojects/gst-rtsp-server/gst/rtsp-server/rtsp-token.c
subprojects/gstreamer/gst/gstevent.c
subprojects/gstreamer/gst/gstmessage.c

index 4062d30..22f96c6 100644 (file)
@@ -239,14 +239,14 @@ gst_rtsp_token_get_structure (GstRTSPToken * token)
 
 /**
  * gst_rtsp_token_writable_structure:
- * @token: The #GstRTSPToken.
+ * @token: A writable #GstRTSPToken.
  *
  * Get a writable version of the structure.
  *
  * Returns: (transfer none): The structure of the token. The structure is still
  * owned by the token, which means that you should not free it and that the
- * pointer becomes invalid when you free the token. This function checks if
- * @token is writable and will never return %NULL.
+ * pointer becomes invalid when you free the token. This function ensures
+ * that @token is writable, and if so, will never return %NULL.
  *
  * MT safe.
  */
index c5bf474..610037b 100644 (file)
@@ -354,15 +354,15 @@ gst_event_get_structure (GstEvent * event)
 
 /**
  * gst_event_writable_structure:
- * @event: The #GstEvent.
+ * @event: A writable #GstEvent.
  *
  * Get a writable version of the structure.
  *
  * Returns: (transfer none): The structure of the event. The structure
  * is still owned by the event, which means that you should not free
  * it and that the pointer becomes invalid when you free the event.
- * This function checks if @event is writable and will never return
- * %NULL.
+ * This function ensures that @event is writable, and if so, will
+ * never return %NULL.
  *
  * MT safe.
  */
index 4e6f2be..adfd8ed 100644 (file)
@@ -1166,15 +1166,15 @@ gst_message_get_structure (GstMessage * message)
 
 /**
  * gst_message_writable_structure:
- * @message: The #GstMessage.
+ * @message: A writable #GstMessage.
  *
  * Get a writable version of the structure.
  *
  * Returns: (transfer none): The structure of the message. The structure
  * is still owned by the message, which means that you should not free
  * it and that the pointer becomes invalid when you free the message.
- * This function checks if @message is writable and will never return
- * %NULL.
+ * This function ensures that @message is writable, and if so, will
+ * never return %NULL.
  *
  * MT safe.
  *