mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-11 15:06: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
e4542c021c
commit
d9ab34b17c
@ -382,21 +382,19 @@ write_callable_info (const gchar *namespace,
|
||||
|
||||
xml_start_element (file, "return-value");
|
||||
|
||||
if (g_type_info_is_pointer (type))
|
||||
switch (g_callable_info_get_caller_owns (info))
|
||||
{
|
||||
switch (g_callable_info_get_caller_owns (info))
|
||||
{
|
||||
case GI_TRANSFER_NOTHING:
|
||||
break;
|
||||
case GI_TRANSFER_CONTAINER:
|
||||
xml_printf (file, " transfer-ownership=\"container\"");
|
||||
break;
|
||||
case GI_TRANSFER_EVERYTHING:
|
||||
xml_printf (file, " transfer-ownership=\"full\"");
|
||||
break;
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
case GI_TRANSFER_NOTHING:
|
||||
xml_printf (file, " transfer-ownership=\"none\"");
|
||||
break;
|
||||
case GI_TRANSFER_CONTAINER:
|
||||
xml_printf (file, " transfer-ownership=\"container\"");
|
||||
break;
|
||||
case GI_TRANSFER_EVERYTHING:
|
||||
xml_printf (file, " transfer-ownership=\"full\"");
|
||||
break;
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
|
||||
if (g_callable_info_may_return_null (info))
|
||||
@ -421,6 +419,7 @@ write_callable_info (const gchar *namespace,
|
||||
switch (g_arg_info_get_ownership_transfer (arg))
|
||||
{
|
||||
case GI_TRANSFER_NOTHING:
|
||||
xml_printf (file, " transfer-ownership=\"none\"");
|
||||
break;
|
||||
case GI_TRANSFER_CONTAINER:
|
||||
xml_printf (file, " transfer-ownership=\"container\"");
|
||||
|
Loading…
Reference in New Issue
Block a user