develooper Front page | perl.cvs.parrot | Postings from December 2008

[svn:parrot] r34406 - in trunk/lib/Parrot: Ops2c Pmc2c

From:
petdance
Date:
December 26, 2008 21:50
Subject:
[svn:parrot] r34406 - in trunk/lib/Parrot: Ops2c Pmc2c
Message ID:
20081227055040.230FCCBA12@x12.develooper.com
Author: petdance
Date: Fri Dec 26 21:50:39 2008
New Revision: 34406

Modified:
   trunk/lib/Parrot/Ops2c/Utils.pm
   trunk/lib/Parrot/Pmc2c/PCCMETHOD.pm

Log:
consting

Modified: trunk/lib/Parrot/Ops2c/Utils.pm
==============================================================================
--- trunk/lib/Parrot/Ops2c/Utils.pm	(original)
+++ trunk/lib/Parrot/Ops2c/Utils.pm	Fri Dec 26 21:50:39 2008
@@ -6,7 +6,7 @@
 use lib ("lib/");
 use Parrot::OpLib::core;
 use Parrot::OpsFile;
-use File::Spec;
+use File::Spec ();
 use IO::File ();
 
 =head1 NAME
@@ -945,7 +945,7 @@
 }
 static void hop_init(void) {
     size_t i;
-    op_info_t * info = $self->{bs}op_lib.op_info_table;
+    op_info_t * const info = $self->{bs}op_lib.op_info_table;
     /* store full names */
     for (i = 0; i < $self->{bs}op_lib.op_count; i++)
         store_op(info + i, 1);

Modified: trunk/lib/Parrot/Pmc2c/PCCMETHOD.pm
==============================================================================
--- trunk/lib/Parrot/Pmc2c/PCCMETHOD.pm	(original)
+++ trunk/lib/Parrot/Pmc2c/PCCMETHOD.pm	Fri Dec 26 21:50:39 2008
@@ -393,15 +393,15 @@
     my $set_params  = make_arg_pmc($params_flags, '_param_sig');
 
     $e->emit( <<"END", __FILE__, __LINE__ + 1 );
-    INTVAL   _n_regs_used[]       = { $n_regs_used };
+    const INTVAL _n_regs_used[]   = { $n_regs_used };
     opcode_t _param_indexes[]     = { $params_indexes };
     opcode_t *_return_indexes;
     opcode_t *_current_args;
-    PMC      *_param_sig          = pmc_new(interp, enum_class_FixedIntegerArray);
+    PMC      * const _param_sig   = pmc_new(interp, enum_class_FixedIntegerArray);
     PMC      *_return_sig         = PMCNULL;
 
     Parrot_Context *_caller_ctx   = CONTEXT(interp);
-    PMC *_ret_cont                = new_ret_continuation_pmc(interp, NULL);
+    PMC * const _ret_cont         = new_ret_continuation_pmc(interp, NULL);
     Parrot_Context *_ctx          = Parrot_push_context(interp, _n_regs_used);
     PMC *_ccont                   = PMCNULL;
 



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About