mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-20 15:48:54 +02:00
Add support for GArrays: add g_type_info_get_array_type() and properly scan GArray args
Based on a previous patch by C. Scott Ananian <cscott@litl.com> https://bugzilla.gnome.org/show_bug.cgi?id=581687
This commit is contained in:
@@ -524,9 +524,14 @@ typedef struct {
|
||||
* of the array. If both has_length and zero_terminated are set, the
|
||||
* convention is to pass -1 for the length if the array is
|
||||
* zero-terminated.
|
||||
* @has_size: Indicates that size is the fixed size of the array.
|
||||
* @array_type: Indicates whether this is a C array, GArray, GPtrArray, or
|
||||
* GByteArray. If something other than a C array, the length and element size
|
||||
* are implicit in the structure.
|
||||
* @length: The index of the parameter which is used to pass the length of the
|
||||
* array. The parameter must be an integer type and have the same
|
||||
* direction as this one.
|
||||
* @size: The fixed size of the array.
|
||||
* @type: The type of the array elements.
|
||||
*
|
||||
* Arrays are passed by reference, thus is_pointer is always 1.
|
||||
@@ -539,7 +544,8 @@ typedef struct {
|
||||
guint16 zero_terminated :1;
|
||||
guint16 has_length :1;
|
||||
guint16 has_size :1;
|
||||
guint16 reserved2 :5;
|
||||
guint16 array_type :2;
|
||||
guint16 reserved2 :3;
|
||||
|
||||
union {
|
||||
guint16 length;
|
||||
|
Reference in New Issue
Block a user