[vala/wip/attributes: 23/31] On-demand Method.returns_floating_reference
- From: Luca Bruno <lucabru src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/wip/attributes: 23/31] On-demand Method.returns_floating_reference
- Date: Wed, 27 Jul 2011 18:32:08 +0000 (UTC)
commit 5d4e72757065cd2e840c3308d93c620f9dcb2315
Author: Luca Bruno <lucabru src gnome org>
Date: Thu Jul 7 17:40:09 2011 +0200
On-demand Method.returns_floating_reference
vala/valamethod.vala | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/vala/valamethod.vala b/vala/valamethod.vala
index af24d29..efa5f0e 100644
--- a/vala/valamethod.vala
+++ b/vala/valamethod.vala
@@ -109,7 +109,14 @@ public class Vala.Method : Subroutine {
*/
public bool is_inline { get; set; }
- public bool returns_floating_reference { get; set; }
+ public bool returns_floating_reference {
+ get {
+ return get_attribute_bool ("CCode", "returns_floating_reference");
+ }
+ set {
+ set_attribute_bool ("CCode", "returns_floating_reference", value);
+ }
+ }
/**
* Specifies whether the C method returns a new instance pointer which
@@ -477,9 +484,6 @@ public class Vala.Method : Subroutine {
if (a.has_argument ("simple_generics")) {
simple_generics = a.get_bool ("simple_generics");
}
- if (a.has_argument ("returns_floating_reference")) {
- returns_floating_reference = a.get_bool ("returns_floating_reference");
- }
if (a.has_argument ("type")) {
custom_return_type_cname = a.get_string ("type");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]