summaryrefslogtreecommitdiff
path: root/perl.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-11-24 20:38:08 +0100
committerNicholas Clark <nick@ccl4.org>2011-12-03 13:34:21 +0100
commit5a702b9ac51e9c840d6b8bac0725b156789b8972 (patch)
tree1e91d31547331db2f23770c2001a3ce7071c6daf /perl.c
parentfc81b7184d0fd04bc43121a2a4a96d7863dfc569 (diff)
downloadperl-5a702b9ac51e9c840d6b8bac0725b156789b8972.tar.gz
Small tidyups in S_incpush() and S_mayberelocate()
Following commit 816005240f1a3b99, which moved VMS-specific code, we can now assign to subdir at the point of declaration. After the refactoring that moved code into S_mayberelocate(), we can assign to libdir at the point of declaration. In turn, this allows the merging of two #ifndef PERL_IS_MINIPERL blocks. Remove a blank line from S_mayberelocate().
Diffstat (limited to 'perl.c')
-rw-r--r--perl.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/perl.c b/perl.c
index 748e28208b..013549ed3c 100644
--- a/perl.c
+++ b/perl.c
@@ -4565,7 +4565,6 @@ S_mayberelocate(pTHX_ const char *const dir, STRLEN len, U32 flags)
#endif
}
return libdir;
-
}
STATIC void
@@ -4594,7 +4593,7 @@ S_incpush(pTHX_ const char *const dir, STRLEN len, U32 flags)
/* Could remove this vestigial extra block, if we don't mind a lot of
re-indenting diff noise. */
{
- SV *libdir;
+ SV *const libdir = mayberelocate(dir, len, flags);
/* Change 20189146be79a0596543441fa369c6bf7f85103f, to fix RT#6665,
arranged to unshift #! line -I onto the front of @INC. However,
-I can add version and architecture specific libraries, and they
@@ -4604,23 +4603,18 @@ S_incpush(pTHX_ const char *const dir, STRLEN len, U32 flags)
the front of @INC. */
#ifndef PERL_IS_MINIPERL
AV *const av = (using_sub_dirs) ? (unshift ? newAV() : inc) : NULL;
-#endif
- libdir = mayberelocate(dir, len, flags);
-
-#ifndef PERL_IS_MINIPERL
/*
* BEFORE pushing libdir onto @INC we may first push version- and
* archname-specific sub-directories.
*/
if (using_sub_dirs) {
- SV *subdir;
+ SV *subdir = newSVsv(libdir);
#ifdef PERL_INC_VERSION_LIST
/* Configure terminates PERL_INC_VERSION_LIST with a NULL */
const char * const incverlist[] = { PERL_INC_VERSION_LIST };
const char * const *incver;
#endif
- subdir = newSVsv(libdir);
if (add_versioned_sub_dirs) {
/* .../version/archname if -d .../version/archname */