In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/2c8ca683ba2cfa11ba67ed8364aabd92180ec161?hp=ba714418a7aa994217ccc6146e2dd6ad1ba7724e>
- Log ----------------------------------------------------------------- commit 2c8ca683ba2cfa11ba67ed8364aabd92180ec161 Author: Daniel Dragan <[email protected]> Date: Sun Oct 14 15:30:01 2012 -0400 win32_freeenvironmentstrings: convert nonpublic exported function to macro win32_freeenvironmentstrings was added in commit 4f46e52b008. It is not documented as public api but is exported. Since it is nothing more than a renaming of win32_free, replace it with a macro to win32_free. This saves an entry in the export table, and the string name of the export from perl517.dll. Also see http://www.nntp.perl.org/group/perl.perl5.porters/2012/09/msg192954.html ----------------------------------------------------------------------- Summary of changes: win32/win32.c | 10 ++++------ win32/win32iop.h | 4 +++- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/win32/win32.c b/win32/win32.c index 3ee85a1..bfc02fd 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -1746,6 +1746,10 @@ win32_ansipath(const WCHAR *widename) return name; } +/* the returned string must be freed with win32_freeenvironmentstrings which is + * implemented as a macro + * void win32_freeenvironmentstrings(void* block) + */ DllExport char * win32_getenvironmentstrings(void) { @@ -1775,12 +1779,6 @@ win32_getenvironmentstrings(void) return(lpStr); } -DllExport void -win32_freeenvironmentstrings(void* block) -{ - win32_free(block); -} - DllExport char * win32_getenv(const char *name) { diff --git a/win32/win32iop.h b/win32/win32iop.h index caf87ae..207c9176 100644 --- a/win32/win32iop.h +++ b/win32/win32iop.h @@ -123,7 +123,7 @@ DllExport int win32_closedir(DIR *dirp); DllExport DIR* win32_dirp_dup(DIR *const dirp, CLONE_PARAMS *const param); DllExport char* win32_getenvironmentstrings(void); -DllExport void win32_freeenvironmentstrings(void *block); +/* also see win32_freeenvironmentstrings macro */ DllExport char* win32_getenv(const char *name); DllExport int win32_putenv(const char *name); @@ -160,6 +160,8 @@ DllExport Sighandler_t win32_signal(int sig, Sighandler_t subcode); END_EXTERN_C +/* see comment in win32_getenvironmentstrings */ +#define win32_freeenvironmentstrings(x) win32_free(x) #undef alarm #define alarm win32_alarm #undef strerror -- Perl5 Master Repository
