mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-09 19:06:15 +01:00
[g-ir-generate] Write out array type
For GLib arrays, write out the array type to the tgir
This commit is contained in:
parent
ecd9c2f3e7
commit
a9a3352d8a
@ -221,9 +221,29 @@ write_type_info (const gchar *namespace,
|
||||
else if (tag == GI_TYPE_TAG_ARRAY)
|
||||
{
|
||||
gint length, size;
|
||||
char *name = NULL;
|
||||
|
||||
xml_start_element (file, "array");
|
||||
|
||||
switch (g_type_info_get_array_type (info)) {
|
||||
case GI_ARRAY_TYPE_C:
|
||||
break;
|
||||
case GI_ARRAY_TYPE_ARRAY:
|
||||
name = "GLib.Array";
|
||||
break;
|
||||
case GI_ARRAY_TYPE_PTR_ARRAY:
|
||||
name = "GLib.PtrArray";
|
||||
break;
|
||||
case GI_ARRAY_TYPE_BYTE_ARRAY:
|
||||
name = "GLib.ByteArray";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (name)
|
||||
xml_printf (file, " name=\"%s\"", name);
|
||||
|
||||
type = g_type_info_get_param_type (info, 0);
|
||||
|
||||
length = g_type_info_get_array_length (info);
|
||||
|
Loading…
Reference in New Issue
Block a user