[vala/wip/attributes: 91/121] Drop custom_return_ctype



commit 10522c30ffa3b1889eb05e52cf9272ee2141216f
Author: Luca Bruno <lucabru src gnome org>
Date:   Sat Jul 2 09:50:15 2011 +0200

    Drop custom_return_ctype

 vala/valagirparser.vala     |    2 +-
 vala/valamethod.vala        |    8 --------
 vapigen/valagidlparser.vala |    2 +-
 3 files changed, 2 insertions(+), 10 deletions(-)
---
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index 9c52dac..8f54984 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -2429,7 +2429,7 @@ public class Vala.GirParser : CodeVisitor {
 				parent_ctype = current.parent.get_cname ();
 			}
 			if (return_ctype != null && (parent_ctype == null || return_ctype != parent_ctype + "*")) {
-				m.custom_return_type_cname = return_ctype;
+				m.set_attribute_string ("CCode", "type", return_ctype);
 			}
 			s = m;
 		} else if (element_name == "glib:signal") {
diff --git a/vala/valamethod.vala b/vala/valamethod.vala
index ed9e6d4..9ed566f 100644
--- a/vala/valamethod.vala
+++ b/vala/valamethod.vala
@@ -133,11 +133,6 @@ public class Vala.Method : Subroutine {
 	public Parameter this_parameter { get; set; }
 
 	/**
-	 * Specifies a custom C return type for this method.
-	 */
-	public string? custom_return_type_cname { get; set; }
-
-	/**
 	 * Specifies whether this method expects printf-style format arguments.
 	 */
 	public bool printf_format { get; set; }
@@ -295,9 +290,6 @@ public class Vala.Method : Subroutine {
 		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");
-		}
 	}
 	
 	/**
diff --git a/vapigen/valagidlparser.vala b/vapigen/valagidlparser.vala
index fb3475a..1c64964 100644
--- a/vapigen/valagidlparser.vala
+++ b/vapigen/valagidlparser.vala
@@ -2097,7 +2097,7 @@ public class Vala.GIdlParser : CodeVisitor {
 			// return type.
 			if (current_data_type is Class && res != null) {
 				if ("%s*".printf (get_cname (current_data_type)) != res.type.unparsed) {
-					m.custom_return_type_cname = res.type.unparsed;
+					m.set_attribute_string ("CCode", "type", res.type.unparsed);
 				}
 			}
 		} else {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]