Author: jkeenan
Date: Sun Feb 11 07:40:38 2007
New Revision: 16942
Modified:
branches/buildtools/tools/build/ops2c.pl
Log:
Move declaration of %arg_dir_mapping to inside the only subroutine where it is
used.
Modified: branches/buildtools/tools/build/ops2c.pl
==============================================================================
--- branches/buildtools/tools/build/ops2c.pl (original)
+++ branches/buildtools/tools/build/ops2c.pl Sun Feb 11 07:40:38 2007
@@ -129,12 +129,6 @@
my $defines = $trans->defines(); # Invoked as: ${defines}
my $bs = "${base}${suffix}_"; # Also invoked as ${bs}
my $opsarraytype = $trans->opsarraytype();
-my %arg_dir_mapping = (
- '' => 'PARROT_ARGDIR_IGNORED',
- 'i' => 'PARROT_ARGDIR_IN',
- 'o' => 'PARROT_ARGDIR_OUT',
- 'io' => 'PARROT_ARGDIR_INOUT'
-);
##### BEGIN printing to $SOURCE #####
open my $SOURCE, '>', $source
@@ -602,6 +596,12 @@
my $argsref = shift;
my $fh = $argsref->{fh};
my %names = %{$argsref->{names}};
+ my %arg_dir_mapping = (
+ '' => 'PARROT_ARGDIR_IGNORED',
+ 'i' => 'PARROT_ARGDIR_IN',
+ 'o' => 'PARROT_ARGDIR_OUT',
+ 'io' => 'PARROT_ARGDIR_INOUT'
+ );
if ( $argsref->{suffix} eq '' ) {
$argsref->{op_info} = "$argsref->{bs}op_info_table";