diff options
author | Daniel Dragan <bulk88@hotmail.com> | 2012-10-14 15:30:01 -0400 |
---|---|---|
committer | Steve Hay <steve.m.hay@googlemail.com> | 2012-10-17 11:36:46 +0100 |
commit | 2c8ca683ba2cfa11ba67ed8364aabd92180ec161 (patch) | |
tree | 7ce2b7b1b0ea5a5ca6eac319e8a1a020fb50199e /win32 | |
parent | ba714418a7aa994217ccc6146e2dd6ad1ba7724e (diff) | |
download | perl-2c8ca683ba2cfa11ba67ed8364aabd92180ec161.tar.gz |
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
Diffstat (limited to 'win32')
-rw-r--r-- | win32/win32.c | 10 | ||||
-rw-r--r-- | win32/win32iop.h | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/win32/win32.c b/win32/win32.c index 3ee85a1afe..bfc02fdee6 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 caf87ae819..207c9176e5 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 |