summaryrefslogtreecommitdiff
path: root/vala/valainterface.vala
diff options
context:
space:
mode:
authorRyan Lortie <desrt@desrt.ca>2009-02-10 15:04:39 +0000
committerRyan Lortie <ryanl@src.gnome.org>2009-02-10 15:04:39 +0000
commit557c03ad957c0fda8b75525bc6c1665588427305 (patch)
tree206f5b5b9ca7ad58910b52472664d135dce591a6 /vala/valainterface.vala
parentf0c175f5f9025e033cdd30694c9f2e3aca491851 (diff)
downloadvala-557c03ad957c0fda8b75525bc6c1665588427305.tar.gz
Bug 571169 – make floating references generic
2009-02-10 Ryan Lortie <desrt@desrt.ca> Bug 571169 – make floating references generic * gobject/valaccodebasemodule.vala: * vala/valainterface.vala: * vala/valaclass.vala: * vala/valaobjectcreationexpression.vala: * vala/valasemanticanalyzer.vala: * vala/valatypesymbol.vala: Add support for 'ref_sink_function' CCode attribute on classes. Use this instead of hardcoding g_object_ref_sink() for GInitiallyUnowned. * vapi/gobject-2.0.vapi: Set ref_sink_function on InitiallyUnowned class. svn path=/trunk/; revision=2425
Diffstat (limited to 'vala/valainterface.vala')
-rw-r--r--vala/valainterface.vala10
1 files changed, 10 insertions, 0 deletions
diff --git a/vala/valainterface.vala b/vala/valainterface.vala
index 1b5be99a0..a998229db 100644
--- a/vala/valainterface.vala
+++ b/vala/valainterface.vala
@@ -399,6 +399,16 @@ public class Vala.Interface : ObjectTypeSymbol {
return null;
}
+ public override string? get_ref_sink_function () {
+ foreach (DataType prerequisite in prerequisites) {
+ string ref_sink_func = prerequisite.data_type.get_ref_sink_function ();
+ if (ref_sink_func != null) {
+ return ref_sink_func;
+ }
+ }
+ return null;
+ }
+
public override bool is_subtype_of (TypeSymbol t) {
if (this == t) {
return true;