Function completion for GVariant maybe types?


The software component "GLib" provides support for nullable data types to some

I imagine that functions like the following will be also useful for this API.

1. g_variant_is_maybe
   A new predicate function that can provide another type check (like

2. g_variant_can_be_nothing/undefined/optional/maybe
   This would provide a similar feature like data base access libraries can
usually determine if a column is allowed to be "NULL".

3. g_variant_convert_to_maybe
   I see a need for a alternative to the interface "g_variant_new_maybe". I
would like to replace a maybe instance directly instead of allocating a new one.

4. g_variant_set_to_nothing/none
   How should a GVariant variable be reset to the special marker "nothing" after
it was used with other concrete values for a while?

How do you think about my suggestion to complete this programming interface?


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]