mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-26 15:36:14 +01:00
[girparser] Don't hard require caller-allocates since it breaks parsing
We need to support parsing older .girs for inclusion purposes. (But we should probably have an explicit .gir version, and require the attribute for newer versions)
This commit is contained in:
parent
46d9ef151e
commit
a20c2ad7c2
11
girparser.c
11
girparser.c
@ -920,14 +920,9 @@ start_parameter (GMarkupParseContext *context,
|
||||
param->in = FALSE;
|
||||
param->out = TRUE;
|
||||
if (caller_allocates == NULL)
|
||||
{
|
||||
g_set_error (error,
|
||||
G_MARKUP_ERROR,
|
||||
G_MARKUP_ERROR_INVALID_CONTENT,
|
||||
"caller-allocates attribute required on out parameters");
|
||||
return FALSE;
|
||||
}
|
||||
param->caller_allocates = strcmp (caller_allocates, "1") == 0;
|
||||
param->caller_allocates = FALSE;
|
||||
else
|
||||
param->caller_allocates = strcmp (caller_allocates, "1") == 0;
|
||||
}
|
||||
else if (direction && strcmp (direction, "inout") == 0)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user