summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2019-04-05 11:03:11 +0200
committerMilan Crha <mcrha@redhat.com>2019-04-05 11:03:11 +0200
commit1e89a2e11f3486d312eb12febb682f9835c5dcf0 (patch)
tree745ac1ba82f1826938bdff5e10951ab1609ad49e
parent746fbcc6079181433446bc798d59814b0ad67891 (diff)
downloadlibical-git-1e89a2e11f3486d312eb12febb682f9835c5dcf0.tar.gz
[libical-glib] Correct some annotations and a property.py test
-rw-r--r--src/libical-glib/api/i-cal-property.xml10
-rwxr-xr-xsrc/test/libical-glib/property.py3
2 files changed, 7 insertions, 6 deletions
diff --git a/src/libical-glib/api/i-cal-property.xml b/src/libical-glib/api/i-cal-property.xml
index d69589d5..d23741e0 100644
--- a/src/libical-glib/api/i-cal-property.xml
+++ b/src/libical-glib/api/i-cal-property.xml
@@ -50,7 +50,7 @@
</method>
<method name="i_cal_property_add_parameter" corresponds="icalproperty_add_parameter" since="1.0">
<parameter type="ICalProperty *" name="prop" comment="The #ICalProperty to be set."/>
- <parameter type="ICalParameter *" name="parameter" annotation="transfer full" owner_op="prop" comment="The parameter to be added into @prop."/>
+ <parameter type="ICalParameter *" name="parameter" annotation="transfer none" owner_op="prop" comment="The parameter to be added into @prop."/>
<comment xml:space="preserve">Add a #ICalParameter into the #ICalProperty. It behaves like set the copy of the #ICalParameter. Upon completion the native part of #ICalParameter will be set to NULL.</comment>
</method>
<method name="i_cal_property_take_parameter" corresponds="CUSTOM" annotation="skip" since="1.0">
@@ -145,22 +145,22 @@
</method>
<method name="i_cal_value_set_parent" corresponds="icalvalue_set_parent" since="2.0">
<parameter type="ICalValue *" name="value" comment="The child #ICalValue"/>
- <parameter type="ICalProperty *" name="property" comment="The parent #ICalProperty"/>
+ <parameter type="ICalProperty *" name="property" annotation="nullable" comment="The parent #ICalProperty"/>
<comment xml:space="preserve">Set the parent property of a value.</comment>
</method>
<method name="i_cal_value_get_parent" corresponds="icalvalue_get_parent" since="3.0">
<parameter type="ICalValue *" name="value" comment="The child #ICalValue"/>
- <returns type="ICalProperty *" annotation="transfer full" comment="The parent #ICalProperty"/>
+ <returns type="ICalProperty *" annotation="transfer full, nullable" comment="The parent #ICalProperty"/>
<comment xml:space="preserve">Get the parent #ICalProperty of the specified #ICalValue.</comment>
</method>
<method name="i_cal_parameter_set_parent" corresponds="icalparameter_set_parent" since="3.0">
<parameter type="ICalParameter *" name="param" comment="The child #ICalParameter"/>
- <parameter type="ICalProperty *" name="property" comment="The parent #ICalProperty"/>
+ <parameter type="ICalProperty *" name="property" annotation="nullable" comment="The parent #ICalProperty"/>
<comment xml:space="preserve">Set the parent #ICalProperty of an #ICalParameter.</comment>
</method>
<method name="i_cal_parameter_get_parent" corresponds="icalparameter_get_parent" since="3.0">
<parameter type="ICalParameter *" name="param" comment="The child #ICalParameter"/>
- <returns type="ICalProperty *" annotation="transfer full" comment="The parent #ICalProperty"/>
+ <returns type="ICalProperty *" annotation="transfer full, nullable" comment="The parent #ICalProperty"/>
<comment xml:space="preserve">Get the parent #ICalProperty of the specified #ICalParameter.</comment>
</method>
<method name="i_cal_property_set_x_name" corresponds="icalproperty_set_x_name" since="1.0">
diff --git a/src/test/libical-glib/property.py b/src/test/libical-glib/property.py
index db78148c..cec09501 100755
--- a/src/test/libical-glib/property.py
+++ b/src/test/libical-glib/property.py
@@ -67,7 +67,7 @@ string_from_property_api = string_property.get_value_as_string_r();
assert(string_from_property_api == string);
value_got_from_property = string_property.get_value();
assert(value_got_from_property.as_ical_string_r() == string);
-string_property.set_value_from_string(ICalGLib.Value.kind_to_string(kind), string);
+string_property.set_value_from_string(string, ICalGLib.Value.kind_to_string(kind));
string_from_property_api = string_property.get_value_as_string_r();
assert(string_from_property_api == string);
value_got_from_property = string_property.get_value();
@@ -101,3 +101,4 @@ kind = ICalGLib.ValueKind.ATTACH_VALUE
string = "This is a link"
value_from_string = ICalGLib.Value.new_from_string(kind, string)
value_from_string.set_parent(string_property)
+value_from_string.set_parent(None)