Add various missing nullable annotations

This commit is contained in:
Sebastian Dröge 2020-10-17 19:59:39 +03:00
parent b5429b7e30
commit c686e1a048
3 changed files with 16 additions and 6 deletions

View File

@ -1693,7 +1693,7 @@ g_key_file_get_keys (GKeyFile *key_file,
* *
* Returns the name of the start group of the file. * Returns the name of the start group of the file.
* *
* Returns: The start group of the key file. * Returns: (nullable): The start group of the key file.
* *
* Since: 2.6 * Since: 2.6
**/ **/

View File

@ -884,7 +884,7 @@ g_main_context_pop_thread_default (GMainContext *context)
* If you need to hold a reference on the context, use * If you need to hold a reference on the context, use
* g_main_context_ref_thread_default() instead. * g_main_context_ref_thread_default() instead.
* *
* Returns: (transfer none): the thread-default #GMainContext, or * Returns: (transfer none) (nullable): the thread-default #GMainContext, or
* %NULL if the thread-default context is the global default context. * %NULL if the thread-default context is the global default context.
* *
* Since: 2.22 * Since: 2.22
@ -2112,7 +2112,7 @@ g_source_set_name (GSource *source,
* Gets a name for the source, used in debugging and profiling. The * Gets a name for the source, used in debugging and profiling. The
* name may be #NULL if it has never been set with g_source_set_name(). * name may be #NULL if it has never been set with g_source_set_name().
* *
* Returns: the name of the source * Returns: (nullable): the name of the source
* *
* Since: 2.26 * Since: 2.26
**/ **/
@ -3098,7 +3098,7 @@ g_main_depth (void)
* *
* Returns the currently firing source for this thread. * Returns the currently firing source for this thread.
* *
* Returns: (transfer none): The currently firing source or %NULL. * Returns: (transfer none) (nullable): The currently firing source or %NULL.
* *
* Since: 2.12 * Since: 2.12
*/ */

View File

@ -754,7 +754,12 @@ g_binding_get_flags (GBinding *binding)
* *
* Retrieves the #GObject instance used as the source of the binding. * Retrieves the #GObject instance used as the source of the binding.
* *
* Returns: (transfer none): the source #GObject * A #GBinding can outlive the source #GObject as the binding does not hold a
* strong reference to the source. If the source is destroyed before the
* binding then this function will return %NULL.
*
* Returns: (transfer none) (nullable): the source #GObject, or %NULL if the
* source does not exist any more.
* *
* Since: 2.26 * Since: 2.26
*/ */
@ -772,7 +777,12 @@ g_binding_get_source (GBinding *binding)
* *
* Retrieves the #GObject instance used as the target of the binding. * Retrieves the #GObject instance used as the target of the binding.
* *
* Returns: (transfer none): the target #GObject * A #GBinding can outlive the target #GObject as the binding does not hold a
* strong reference to the target. If the target is destroyed before the
* binding then this function will return %NULL.
*
* Returns: (transfer none) (nullable): the target #GObject, or %NULL if the
* target does not exist any more.
* *
* Since: 2.26 * Since: 2.26
*/ */