[svn:parrot] r40308 - in trunk: lib/Parrot/Pmc2c t/tools

NotFound at svn.parrot.org NotFound at svn.parrot.org
Tue Jul 28 16:55:11 UTC 2009


Author: NotFound
Date: Tue Jul 28 16:55:09 2009
New Revision: 40308
URL: https://trac.parrot.org/parrot/changeset/40308

Log:
[cage] fix badly named variable in generated code, TT #217

Modified:
   trunk/lib/Parrot/Pmc2c/PMCEmitter.pm
   trunk/t/tools/pmc2c.t

Modified: trunk/lib/Parrot/Pmc2c/PMCEmitter.pm
==============================================================================
--- trunk/lib/Parrot/Pmc2c/PMCEmitter.pm	Tue Jul 28 14:44:07 2009	(r40307)
+++ trunk/lib/Parrot/Pmc2c/PMCEmitter.pm	Tue Jul 28 16:55:09 2009	(r40308)
@@ -666,12 +666,12 @@
 
         {
             /* Register this PMC as a HLL mapping */
-            const INTVAL pmc_id = Parrot_get_HLL_id( interp, CONST_STRING_GEN(interp, "$hll"));
-            if (pmc_id > 0) {
+            const INTVAL hll_id = Parrot_get_HLL_id( interp, CONST_STRING_GEN(interp, "$hll"));
+            if (hll_id > 0) {
 EOC
         foreach my $maps ( sort keys %{ $self->{flags}{maps} } ) {
             $cout .= <<"EOC";
-                Parrot_register_HLL_type( interp, pmc_id, enum_class_$maps, entry);
+                Parrot_register_HLL_type( interp, hll_id, enum_class_$maps, entry);
 EOC
         }
         $cout .= <<"EOC";

Modified: trunk/t/tools/pmc2c.t
==============================================================================
--- trunk/t/tools/pmc2c.t	Tue Jul 28 14:44:07 2009	(r40307)
+++ trunk/t/tools/pmc2c.t	Tue Jul 28 16:55:09 2009	(r40308)
@@ -149,19 +149,19 @@
 pmc2c_output_like( <<'END_PMC', <<'END_C', 'maps' );
 pmclass a hll dale maps Integer { }
 END_PMC
-            const INTVAL pmc_id = Parrot_get_HLL_id( interp, CONST_STRING_GEN(interp, "dale"));
-            if (pmc_id > 0) {
-                Parrot_register_HLL_type( interp, pmc_id, enum_class_Integer, entry);
+            const INTVAL hll_id = Parrot_get_HLL_id( interp, CONST_STRING_GEN(interp, "dale"));
+            if (hll_id > 0) {
+                Parrot_register_HLL_type( interp, hll_id, enum_class_Integer, entry);
             }
 END_C
 
 pmc2c_output_like( <<'END_PMC', <<'END_C', 'maps, more than one.' );
 pmclass a hll dale maps Integer maps Float { }
 END_PMC
-            const INTVAL pmc_id = Parrot_get_HLL_id( interp, CONST_STRING_GEN(interp, "dale"));
-            if (pmc_id > 0) {
-                Parrot_register_HLL_type( interp, pmc_id, enum_class_Float, entry);
-                Parrot_register_HLL_type( interp, pmc_id, enum_class_Integer, entry);
+            const INTVAL hll_id = Parrot_get_HLL_id( interp, CONST_STRING_GEN(interp, "dale"));
+            if (hll_id > 0) {
+                Parrot_register_HLL_type( interp, hll_id, enum_class_Float, entry);
+                Parrot_register_HLL_type( interp, hll_id, enum_class_Integer, entry);
             }
 END_C
 


More information about the parrot-commits mailing list