|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-06-08 15:27 UTC] tony2001@php.net
[2010-06-08 15:27 UTC] tony2001@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: tony2001
[2010-06-08 15:27 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 09:00:01 2025 UTC |
Description: ------------ TSRM/tsrm_virtual_cwd.c uses the same name for a global variable as well as for arguments to a function (when #ifndef ZTS). #ifdef ZTS ts_rsrc_id cwd_globals_id; #else virtual_cwd_globals cwd_globals; #endif static void cwd_globals_ctor(virtual_cwd_globals *cwd_globals TSRMLS_DC) /* {{{ */ static void cwd_globals_dtor(virtual_cwd_globals *cwd_globals TSRMLS_DC) /* {{{ */ Reproduce code: --------------- The following patch avoids the name clash: diff -r f2728a22d214 TSRM/tsrm_virtual_cwd.c --- a/TSRM/tsrm_virtual_cwd.c Fri Nov 06 18:07:39 2009 +0530 +++ b/TSRM/tsrm_virtual_cwd.c Fri Nov 06 18:13:55 2009 +0530 @@ -262,19 +262,19 @@ } /* }}} */ -static void cwd_globals_ctor(virtual_cwd_globals *cwd_globals TSRMLS_DC) /* {{{ */ +static void cwd_globals_ctor(virtual_cwd_globals *cwdg TSRMLS_DC) /* {{{ */ { - CWD_STATE_COPY(&cwd_globals->cwd, &main_cwd_state); - cwd_globals->realpath_cache_size = 0; - cwd_globals->realpath_cache_size_limit = REALPATH_CACHE_SIZE; - cwd_globals->realpath_cache_ttl = REALPATH_CACHE_TTL; - memset(cwd_globals->realpath_cache, 0, sizeof(cwd_globals->realpath_cache)); + CWD_STATE_COPY(&cwdg->cwd, &main_cwd_state); + cwdg->realpath_cache_size = 0; + cwdg->realpath_cache_size_limit = REALPATH_CACHE_SIZE; + cwdg->realpath_cache_ttl = REALPATH_CACHE_TTL; + memset(cwdg->realpath_cache, 0, sizeof(cwdg->realpath_cache)); } /* }}} */ -static void cwd_globals_dtor(virtual_cwd_globals *cwd_globals TSRMLS_DC) /* {{{ */ +static void cwd_globals_dtor(virtual_cwd_globals *cwdg TSRMLS_DC) /* {{{ */ { - CWD_STATE_FREE(&cwd_globals->cwd); + CWD_STATE_FREE(&cwdg->cwd); realpath_cache_clean(TSRMLS_C); } /* }}} */ Expected result: ---------------- Disambiguity.