[svn:parrot] r42442 - trunk/lib/Parrot/Pmc2c
bacek at svn.parrot.org
bacek at svn.parrot.org
Thu Nov 12 10:20:09 UTC 2009
Author: bacek
Date: Thu Nov 12 10:20:09 2009
New Revision: 42442
URL: https://trac.parrot.org/parrot/changeset/42442
Log:
Use File::Spec to generate pmc_foo.h filenames to avoid problems with '/' vs '\'.
Modified:
trunk/lib/Parrot/Pmc2c/UtilFunctions.pm
Modified: trunk/lib/Parrot/Pmc2c/UtilFunctions.pm
==============================================================================
--- trunk/lib/Parrot/Pmc2c/UtilFunctions.pm Thu Nov 12 10:18:46 2009 (r42441)
+++ trunk/lib/Parrot/Pmc2c/UtilFunctions.pm Thu Nov 12 10:20:09 2009 (r42442)
@@ -5,6 +5,7 @@
use strict;
use warnings;
+use File::Spec ();
use Fatal qw(open close);
use base qw( Exporter );
@@ -283,7 +284,7 @@
$filename =~ s{(\w+)\.\w+$}{pmc_$1.h};
}
else {
- $filename =~ s{(?:.*/)?(\w+)\.\w+$}{include/pmc/pmc_$1.h};
+ $filename =~ s{(?:.*/)?(\w+)\.\w+$}{File::Spec->catfile('include', 'pmc', "pmc_$1.h")}e;
}
}
$filename =~ s/\.\w+$/.c/ if ( $type eq ".c" );
More information about the parrot-commits
mailing list