[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:
Colin Walters 2010-05-26 13:52:36 -04:00
parent 46d9ef151e
commit a20c2ad7c2

View File

@ -920,14 +920,9 @@ start_parameter (GMarkupParseContext *context,
param->in = FALSE; param->in = FALSE;
param->out = TRUE; param->out = TRUE;
if (caller_allocates == NULL) if (caller_allocates == NULL)
{ param->caller_allocates = FALSE;
g_set_error (error, else
G_MARKUP_ERROR, param->caller_allocates = strcmp (caller_allocates, "1") == 0;
G_MARKUP_ERROR_INVALID_CONTENT,
"caller-allocates attribute required on out parameters");
return FALSE;
}
param->caller_allocates = strcmp (caller_allocates, "1") == 0;
} }
else if (direction && strcmp (direction, "inout") == 0) else if (direction && strcmp (direction, "inout") == 0)
{ {