[vala/wip/attributes: 119/119] Fix setting double attribute argument



commit bb26eb65ef43c99222bc07e1a79685e377e6b559
Author: Luca Bruno <lucabru src gnome org>
Date:   Mon Jul 4 12:21:20 2011 +0200

    Fix setting double attribute argument

 tests/gir/bug651773.test |    2 +-
 vala/valacodenode.vala   |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/tests/gir/bug651773.test b/tests/gir/bug651773.test
index e4dbdf9..10310f2 100644
--- a/tests/gir/bug651773.test
+++ b/tests/gir/bug651773.test
@@ -20,5 +20,5 @@ Input:
 
 Output:
 
-[CCode (cheader_filename = "test.h", array_length_pos = 0.1, array_length_type = "gsize")]
+[CCode (cname = "test_get_array", array_length_type = "gsize", array_length_pos = 0.1, cheader_filename = "test.h")]
 public static unowned uint8[] get_array ();
diff --git a/vala/valacodenode.vala b/vala/valacodenode.vala
index 2836daf..1c47c12 100644
--- a/vala/valacodenode.vala
+++ b/vala/valacodenode.vala
@@ -317,7 +317,7 @@ public abstract class Vala.CodeNode {
 			a = new Attribute (attribute, source_reference);
 			attributes.set (attribute, a);
 		}
-		a.add_argument (argument, value.to_string ());
+		a.add_argument (argument, "%g".printf (value));
 	}
 
 	/**



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