mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-15 12:08:04 +02:00
gvarianttype: Improve docs on type validation
Spotted by skrcprst. Signed-off-by: Philip Withnall <pwithnall@gnome.org>
This commit is contained in:
parent
913a1bfd85
commit
18eb38fa15
@ -36,6 +36,19 @@
|
||||
*
|
||||
* A type in the [type@GLib.Variant] type system.
|
||||
*
|
||||
* [type@GLib.Variant] types are represented as strings, but have a strict
|
||||
* syntax described below. All [type@GLib.VariantType]s passed to GLib must be
|
||||
* valid, and they are typically expected to be static (i.e. not provided by
|
||||
* user input) as they determine how binary [type@GLib.Variant] data is
|
||||
* interpreted.
|
||||
*
|
||||
* To convert a static string to a [type@GLib.VariantType] in C, use the
|
||||
* [func@GLib.VARIANT_TYPE] casting macro. When GLib is compiled with checks
|
||||
* enabled, it will validate the type. To check if an arbitrary string is a
|
||||
* valid [type@GLib.VariantType], use [func@GLib.VariantType.string_is_valid].
|
||||
*
|
||||
* ## GVariant Type System
|
||||
*
|
||||
* This section introduces the [type@GLib.Variant] type system. It is based, in
|
||||
* large part, on the D-Bus type system, with two major changes and
|
||||
* some minor lifting of restrictions. The
|
||||
|
Loading…
x
Reference in New Issue
Block a user