diff options
author | Nicholas Clark <nick@ccl4.org> | 2009-02-16 22:21:15 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2009-02-16 22:21:15 +0000 |
commit | 96e4a957123c0888bec702f32e27a3e1dfbdc767 (patch) | |
tree | aeda2c5af78e3e5e0414ebfc18d8e45ee6961e11 /perl.c | |
parent | bdb1cbf7b53e27466d3d9ba865b3b0e74998bf89 (diff) | |
download | perl-96e4a957123c0888bec702f32e27a3e1dfbdc767.tar.gz |
By spliting PERL_ARCH_FMT into PERL_ARCH_FMT_PREFIX and SUFFIX, we can replace
two more Perl_sv_setpvf()s with sv_setsv()/sv_catpvs() pairs.
Diffstat (limited to 'perl.c')
-rw-r--r-- | perl.c | 19 |
1 files changed, 12 insertions, 7 deletions
@@ -4462,15 +4462,18 @@ S_incpush(pTHX_ const char *const dir, STRLEN len, U32 flags) #endif if (addsubdirs) { #ifdef MACOS_TRADITIONAL -#define PERL_ARCH_FMT "%s:" +#define PERL_ARCH_FMT_PREFIX "" +#define PERL_ARCH_FMT_SUFFIX ":" #define PERL_ARCH_FMT_PATH PERL_FS_VERSION "" #else -#define PERL_ARCH_FMT "/%s" +#define PERL_ARCH_FMT_PREFIX "/" +#define PERL_ARCH_FMT_SUFFIX "" #define PERL_ARCH_FMT_PATH "/" PERL_FS_VERSION #endif /* .../version/archname if -d .../version/archname */ - Perl_sv_setpvf(aTHX_ subdir, "%"SVf PERL_ARCH_FMT_PATH PERL_ARCH_FMT, - SVfARG(libdir), ARCHNAME); + sv_setsv(subdir, libdir); + sv_catpvs(subdir, PERL_ARCH_FMT_PATH \ + PERL_ARCH_FMT_PREFIX ARCHNAME PERL_ARCH_FMT_SUFFIX); subdir = S_incpush_if_exists(aTHX_ av, subdir); /* .../version if -d .../version */ @@ -4479,8 +4482,9 @@ S_incpush(pTHX_ const char *const dir, STRLEN len, U32 flags) subdir = S_incpush_if_exists(aTHX_ av, subdir); /* .../archname if -d .../archname */ - Perl_sv_setpvf(aTHX_ subdir, "%"SVf PERL_ARCH_FMT, - SVfARG(libdir), ARCHNAME); + sv_setsv(subdir, libdir); + sv_catpvs(subdir, + PERL_ARCH_FMT_PREFIX ARCHNAME PERL_ARCH_FMT_SUFFIX); subdir = S_incpush_if_exists(aTHX_ av, subdir); } @@ -4489,7 +4493,8 @@ S_incpush(pTHX_ const char *const dir, STRLEN len, U32 flags) if (addoldvers) { for (incver = incverlist; *incver; incver++) { /* .../xxx if -d .../xxx */ - Perl_sv_setpvf(aTHX_ subdir, "%"SVf PERL_ARCH_FMT, + Perl_sv_setpvf(aTHX_ subdir, "%"SVf PERL_ARCH_FMT_PREFIX \ + "%s" PERL_ARCH_FMT_SUFFIX, SVfARG(libdir), *incver); subdir = S_incpush_if_exists(aTHX_ av, subdir); } |