mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-26 15:36:14 +01:00
Bug 556739 – transfer-ownership attribute should be mandatory in .gir
2008-10-23 Tommi Komulainen <tommi.komulainen@iki.fi> * girepository/girparser.c (parse_param_transfer): * giscanner/transformer.py (_create_parameter, _create_return): * giscanner/girwriter.py (_write_return, _write_parameter): * tools/generate.c (write_callable_info): always write and require "transfer-ownership" for return-values and parameters * tests/boxed.gir: * tests/invoke/testfns-1.0.gir: * tests/object.gir: * tests/scanner/DrawableAdditions.xml: * tests/scanner/GtkFrob-1.0-expected.tgir: * tests/scanner/annotation-1.0-expected.tgir: * tests/scanner/drawable-1.0-expected.tgir: * tests/scanner/drawable-injected-1.0-expected.gir: * tests/scanner/drawable-injected-1.0-expected.tgir: * tests/scanner/foo-1.0-expected.tgir: Updated svn path=/trunk/; revision=797
This commit is contained in:
parent
bb2b5e1ee3
commit
2d0f1b3093
26
girparser.c
26
girparser.c
@ -660,30 +660,28 @@ start_function (GMarkupParseContext *context,
|
||||
static void
|
||||
parse_param_transfer (GIrNodeParam *param, const gchar *transfer)
|
||||
{
|
||||
if (transfer && strcmp (transfer, "none") == 0)
|
||||
if (transfer == NULL)
|
||||
{
|
||||
g_warning ("required attribute 'transfer-ownership' missing");
|
||||
}
|
||||
else if (strcmp (transfer, "none") == 0)
|
||||
{
|
||||
param->transfer = FALSE;
|
||||
param->shallow_transfer = FALSE;
|
||||
}
|
||||
else if (transfer && strcmp (transfer, "container") == 0)
|
||||
else if (strcmp (transfer, "container") == 0)
|
||||
{
|
||||
param->transfer = FALSE;
|
||||
param->shallow_transfer = TRUE;
|
||||
}
|
||||
else if (strcmp (transfer, "full") == 0)
|
||||
{
|
||||
param->transfer = TRUE;
|
||||
param->shallow_transfer = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (transfer)
|
||||
{
|
||||
if (strcmp (transfer, "full") != 0)
|
||||
g_warning ("Unknown transfer %s", transfer);
|
||||
else
|
||||
param->transfer = TRUE;
|
||||
}
|
||||
else if (param->in && !param->out)
|
||||
param->transfer = FALSE;
|
||||
else
|
||||
param->transfer = TRUE;
|
||||
param->shallow_transfer = FALSE;
|
||||
g_warning ("Unknown transfer-ownership value: %s", transfer);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user