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 /iperlsys.h | |
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 'iperlsys.h')
-rw-r--r-- | iperlsys.h | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/iperlsys.h b/iperlsys.h index d7b764347f..f82d9c57cb 100644 --- a/iperlsys.h +++ b/iperlsys.h @@ -476,9 +476,12 @@ typedef char* (*LPENVGetenv_len)(struct IPerlEnv*, #endif #ifdef WIN32 typedef unsigned long (*LPEnvOsID)(struct IPerlEnv*); -typedef char* (*LPEnvLibPath)(struct IPerlEnv*, const char*); -typedef char* (*LPEnvSiteLibPath)(struct IPerlEnv*, const char*); -typedef char* (*LPEnvVendorLibPath)(struct IPerlEnv*, const char*); +typedef char* (*LPEnvLibPath)(struct IPerlEnv*, const char*, + STRLEN *const len); +typedef char* (*LPEnvSiteLibPath)(struct IPerlEnv*, const char*, + STRLEN *const len); +typedef char* (*LPEnvVendorLibPath)(struct IPerlEnv*, const char*, + STRLEN *const len); typedef void (*LPEnvGetChildIO)(struct IPerlEnv*, child_IO_table*); #endif @@ -544,12 +547,12 @@ struct IPerlEnvInfo #ifdef WIN32 #define PerlEnv_os_id() \ (*PL_Env->pEnvOsID)(PL_Env) -#define PerlEnv_lib_path(str) \ - (*PL_Env->pLibPath)(PL_Env,(str)) -#define PerlEnv_sitelib_path(str) \ - (*PL_Env->pSiteLibPath)(PL_Env,(str)) -#define PerlEnv_vendorlib_path(str) \ - (*PL_Env->pVendorLibPath)(PL_Env,(str)) +#define PerlEnv_lib_path(str, lenp) \ + (*PL_Env->pLibPath)(PL_Env,(str),(lenp)) +#define PerlEnv_sitelib_path(str, lenp) \ + (*PL_Env->pSiteLibPath)(PL_Env,(str),(lenp)) +#define PerlEnv_vendorlib_path(str, lenp) \ + (*PL_Env->pVendorLibPath)(PL_Env,(str),(lenp)) #define PerlEnv_get_child_IO(ptr) \ (*PL_Env->pGetChildIO)(PL_Env, ptr) #endif @@ -570,9 +573,9 @@ struct IPerlEnvInfo #ifdef WIN32 #define PerlEnv_os_id() win32_os_id() -#define PerlEnv_lib_path(str) win32_get_privlib(str) -#define PerlEnv_sitelib_path(str) win32_get_sitelib(str) -#define PerlEnv_vendorlib_path(str) win32_get_vendorlib(str) +#define PerlEnv_lib_path(str, lenp) win32_get_privlib(str, lenp) +#define PerlEnv_sitelib_path(str, lenp) win32_get_sitelib(str, lenp) +#define PerlEnv_vendorlib_path(str, lenp) win32_get_vendorlib(str, lenp) #define PerlEnv_get_child_IO(ptr) win32_get_child_IO(ptr) #define PerlEnv_clearenv() win32_clearenv() #define PerlEnv_get_childenv() win32_get_childenv() |