[vala/wip/attributes: 96/121] Drop simple_generics
- From: Luca Bruno <lucabru src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/wip/attributes: 96/121] Drop simple_generics
- Date: Mon, 4 Jul 2011 17:16:49 +0000 (UTC)
commit f3f0af68727dec6a395f0f9d89e40229e377f708
Author: Luca Bruno <lucabru src gnome org>
Date: Sat Jul 2 14:03:12 2011 +0200
Drop simple_generics
vala/valamethod.vala | 19 ++++++-------------
1 files changed, 6 insertions(+), 13 deletions(-)
---
diff --git a/vala/valamethod.vala b/vala/valamethod.vala
index 8b38853..2507346 100644
--- a/vala/valamethod.vala
+++ b/vala/valamethod.vala
@@ -75,7 +75,11 @@ 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");
+ }
+ }
/**
* Specifies whether the C method returns a new instance pointer which
@@ -251,23 +255,12 @@ public class Vala.Method : Subroutine {
}
}
- private void process_ccode_attribute (Attribute a) {
- 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");
- }
- }
-
/**
* Process all associated attributes.
*/
public void process_attributes () {
foreach (Attribute a in attributes) {
- if (a.name == "CCode") {
- process_ccode_attribute (a);
- } else if (a.name == "ReturnsModifiedPointer") {
+ if (a.name == "ReturnsModifiedPointer") {
returns_modified_pointer = true;
} else if (a.name == "FloatingReference") {
return_type.floating_reference = true;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]