mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-28 13:12:10 +01:00
Bug 585328 - Only set zero_terminated flag for types we know are
Rationalize our setting of the zero_terminated flag; we shouldn't set it if the gir doesn't say to.
This commit is contained in:
parent
1a256fd7bd
commit
0a046b7aa0
@ -1710,6 +1710,12 @@ start_type (GMarkupParseContext *context,
|
||||
|
||||
typenode->has_size = size != NULL;
|
||||
typenode->size = typenode->has_size ? atoi (size) : -1;
|
||||
|
||||
if (zero)
|
||||
typenode->zero_terminated = strcmp(zero, "1") == 0;
|
||||
else
|
||||
/* If neither zero-terminated nor length nor fixed-size is given, assume zero-terminated. */
|
||||
typenode->zero_terminated = !(typenode->has_length || typenode->has_size);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user