diff options
author | Nicholas Clark <nick@ccl4.org> | 2009-02-20 20:09:16 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2009-02-20 20:16:12 +0000 |
commit | e6a0bbf8b4e00dca6da011b9cb1d8c949b3bfa1e (patch) | |
tree | 4fb59c91c234617af3526425a3b8123c2c5a2bab /perl.c | |
parent | fd2c5c6c3907b40a30d10beb189791226562c647 (diff) | |
download | perl-e6a0bbf8b4e00dca6da011b9cb1d8c949b3bfa1e.tar.gz |
Add a parameter to win32_get_{priv,site,vendor}lib(), to return the length,
as we already know it, and use it in S_init_perllib() to save a strlen() in
S_incpush_use_sep().
Diffstat (limited to 'perl.c')
-rw-r--r-- | perl.c | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -4094,6 +4094,10 @@ S_init_perllib(pTHX_ U32 old_vers) { dVAR; char *s; +#ifdef WIN32 + STRLEN len; +#endif + if (!PL_tainting) { #ifndef VMS s = PerlEnv_getenv("PERL5LIB"); @@ -4178,9 +4182,9 @@ S_init_perllib(pTHX_ U32 old_vers) #ifdef SITELIB_EXP # if defined(WIN32) /* this picks up sitearch as well */ - s = win32_get_sitelib(PERL_FS_VERSION); + s = win32_get_sitelib(PERL_FS_VERSION, &len); if (s) - incpush_use_sep(s, 0, INCPUSH_ADD_SUB_DIRS|INCPUSH_CAN_RELOCATE); + incpush_use_sep(s, len, INCPUSH_ADD_SUB_DIRS|INCPUSH_CAN_RELOCATE); # else S_incpush_use_sep(aTHX_ STR_WITH_LEN(SITELIB_EXP), INCPUSH_CAN_RELOCATE); # endif @@ -4204,9 +4208,9 @@ S_init_perllib(pTHX_ U32 old_vers) #ifdef PERL_VENDORLIB_EXP # if defined(WIN32) /* this picks up vendorarch as well */ - s = win32_get_vendorlib(PERL_FS_VERSION); + s = win32_get_vendorlib(PERL_FS_VERSION, &len); if (s) - incpush_use_sep(s, 0, INCPUSH_ADD_SUB_DIRS|INCPUSH_CAN_RELOCATE); + incpush_use_sep(s, len, INCPUSH_ADD_SUB_DIRS|INCPUSH_CAN_RELOCATE); # else S_incpush_use_sep(aTHX_ STR_WITH_LEN(PERL_VENDORLIB_EXP), INCPUSH_CAN_RELOCATE); # endif @@ -4228,9 +4232,9 @@ S_init_perllib(pTHX_ U32 old_vers) #endif #if defined(WIN32) - s = win32_get_privlib(PERL_FS_VERSION); + s = win32_get_privlib(PERL_FS_VERSION, &len); if (s) - incpush_use_sep(s, 0, INCPUSH_ADD_SUB_DIRS|INCPUSH_CAN_RELOCATE); + incpush_use_sep(s, len, INCPUSH_ADD_SUB_DIRS|INCPUSH_CAN_RELOCATE); #else S_incpush_use_sep(aTHX_ STR_WITH_LEN(PRIVLIB_EXP), INCPUSH_CAN_RELOCATE); #endif |