changeset 7853:263cdf57a1dd

Use all properties in factory default values (including the ones starting with __)
author Michael Goffioul <michael.goffioul@gmail.com>
date Sun, 02 Mar 2008 14:44:31 +0100
parents 4dc3e0ff730a
children 228858e69bd1
files src/ChangeLog src/genprops.awk
diffstat 2 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Sat Mar 01 22:07:53 2008 +0200
+++ b/src/ChangeLog	Sun Mar 02 14:44:31 2008 +0100
@@ -27,6 +27,8 @@
 
 2008-06-04  Michael Goffioul <michael.goffioul@gmail.com>
 
+	* genprops.awk (emit_source): Use all properties in factory defaults.
+
 	* graphics.h.in (base_property::base_property): Set internal counter
 	to 1 by default.
 	(property::property): Adapt constructors to default counter value in
--- a/src/genprops.awk	Sat Mar 01 22:07:53 2008 +0200
+++ b/src/genprops.awk	Sun Mar 02 14:44:31 2008 +0100
@@ -466,9 +466,8 @@
         dval = gensub (/^.*\{(.*)\}.*$/, "\"\\1\"", "g", dval);
       if (! dval)
         dval = "octave_value ()";
-      if (name[i] !~ /__.*/)
-        printf ("  m[\"%s\"] = %s%s;\n", name[i], dval,
-                (type[i] == "handle_property" ? ".as_octave_value ()" : "")) >> filename;
+      printf ("  m[\"%s\"] = %s%s;\n", name[i], dval,
+		 (type[i] == "handle_property" ? ".as_octave_value ()" : "")) >> filename;
     }
 
     printf ("\n  return m;\n}\n\n") >> filename;