libgnt/libgnt

Add scopes to callbacks

10 months ago, Elliott Sales de Andrade
c59e9d4a6772
Parents c037bea489ec
Children 11e76ef096a3
Add scopes to callbacks

The `forever` scope is probably newer than the minimum requirement, but it'll just cause a warning in older versions.

Testing Done:
Built docs and saw no more scope warnings.

Reviewed at https://reviews.imfreedom.org/r/2459/
  • +10 -10
    gnttree.h
  • --- a/gnttree.h Thu Feb 23 22:35:51 2023 -0600
    +++ b/gnttree.h Mon Jun 05 00:06:34 2023 -0500
    @@ -489,9 +489,9 @@
    /**
    * gnt_tree_set_compare_func:
    - * @tree: The tree
    - * @func: (scope call): The comparison function, which is used to compare
    - * the keys
    + * @tree: The tree.
    + * @func: (scope forever): The comparison function, which is used to compare
    + * the keys.
    *
    * Set the compare function for sorting the data.
    *
    @@ -539,11 +539,11 @@
    /**
    * gnt_tree_set_hash_fns:
    - * @tree: The tree
    - * @hash: The hashing function
    - * @eq: The function to compare keys
    - * @kd: The function to use to free the keys when a row is removed
    - * from the tree
    + * @tree: The tree.
    + * @hash: (scope forever): The hashing function.
    + * @eq: (scope forever): The function to compare keys.
    + * @kd: (scope forever): The function to use to free the keys when a row is
    + * removed from the tree.
    *
    * Set the hash functions to use to hash, compare and free the keys.
    */
    @@ -642,8 +642,8 @@
    /**
    * gnt_tree_set_search_function:
    - * @tree: The tree
    - * @func: The custom search function.
    + * @tree: The tree.
    + * @func: (scope forever): The custom search function.
    *
    * Set a custom search function.
    *