cvs: php4 /ext/standard browscap.c /main main.c php_ini.c /sapi/cgi cgi_main.c

From: Date: Fri, 03 Aug 2001 07:15:15 +0000
Subject: cvs: php4 /ext/standard browscap.c /main main.c php_ini.c /sapi/cgi cgi_main.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-6501@lists.php.net to get a copy of this message
zeev Fri Aug 3 03:15:15 2001 EDT Modified files: /php4/ext/standard browscap.c /php4/main main.c php_ini.c /php4/sapi/cgi cgi_main.c Log: Get rid of a couple of bogus persist_alloc()'s, and some cleanup Index: php4/ext/standard/browscap.c diff -u php4/ext/standard/browscap.c:1.49 php4/ext/standard/browscap.c:1.50 --- php4/ext/standard/browscap.c:1.49 Sun Jul 29 04:40:41 2001 +++ php4/ext/standard/browscap.c Fri Aug 3 03:15:11 2001 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: browscap.c,v 1.49 2001/07/29 08:40:41 andi Exp $ */ +/* $Id: browscap.c,v 1.50 2001/08/03 07:15:11 zeev Exp $ */ #include "php.h" #include "php_regex.h" @@ -236,7 +236,7 @@ if (zend_hash_find(&browser_hash, (*agent_name)->value.str.val,(*agent_name)->value.str.len+1, (void **) &agent)==FAILURE) { lookup_browser_name = (*agent_name)->value.str.val; found_browser_entry = NULL; - zend_hash_apply_with_arguments(&browser_hash,(int (*)(void *, int, va_list, zend_hash_key *)) browser_reg_compare,2,lookup_browser_name,&found_browser_entry); + zend_hash_apply_with_arguments(&browser_hash, (apply_func_args_t) browser_reg_compare, 2, lookup_browser_name, &found_browser_entry); if (found_browser_entry) { agent = &found_browser_entry; Index: php4/main/main.c diff -u php4/main/main.c:1.393 php4/main/main.c:1.394 --- php4/main/main.c:1.393 Tue Jul 31 03:09:48 2001 +++ php4/main/main.c Fri Aug 3 03:15:13 2001 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: main.c,v 1.393 2001/07/31 07:09:48 zeev Exp $ */ +/* $Id: main.c,v 1.394 2001/08/03 07:15:13 zeev Exp $ */ /* {{{ includes */ @@ -714,13 +714,6 @@ } /* }}} */ -/* {{{ php_config_ini_shutdown - */ -static void php_config_ini_shutdown(void) -{ - php_shutdown_config(); -} -/* }}} */ /* {{{ php_body_write_wrapper */ @@ -952,7 +945,7 @@ } /* close down the ini config */ - php_config_ini_shutdown(); + php_shutdown_config(); #ifdef PHP_WIN32 /*close winsock */ Index: php4/main/php_ini.c diff -u php4/main/php_ini.c:1.66 php4/main/php_ini.c:1.67 --- php4/main/php_ini.c:1.66 Tue Jul 31 03:09:48 2001 +++ php4/main/php_ini.c Fri Aug 3 03:15:14 2001 @@ -273,7 +273,8 @@ tmp.value.str.val = zend_strndup(php_ini_opened_path, tmp.value.str.len); tmp.type = IS_STRING; zend_hash_update(&configuration_hash, "cfg_file_path", sizeof("cfg_file_path"),(void *) &tmp,sizeof(zval), NULL); - persist_alloc(php_ini_opened_path); + efree(php_ini_opened_path); + php_ini_opened_path = zend_strndup(tmp.value.str.val, tmp.value.str.len); } return SUCCESS; @@ -286,7 +287,7 @@ { zend_hash_destroy(&configuration_hash); if (php_ini_opened_path) { - efree(php_ini_opened_path); + free(php_ini_opened_path); } return SUCCESS; } Index: php4/sapi/cgi/cgi_main.c diff -u php4/sapi/cgi/cgi_main.c:1.125 php4/sapi/cgi/cgi_main.c:1.126 --- php4/sapi/cgi/cgi_main.c:1.125 Tue Jul 31 03:09:48 2001 +++ php4/sapi/cgi/cgi_main.c Fri Aug 3 03:15:14 2001 @@ -304,7 +304,7 @@ php_destroy_request_info()! */ #if DISCARD_PATH if (script_filename) { - SG(request_info).path_translated = estrdup(script_filename); + SG(request_info).path_translated = strdup(script_filename); } else { SG(request_info).path_translated = NULL; } @@ -538,7 +538,7 @@ break; case 'f': /* parse file */ - script_file = estrdup(ap_php_optarg); + script_file = strdup(ap_php_optarg); no_headers = 1; break; @@ -687,7 +687,7 @@ if (!cgi) { if (!SG(request_info).path_translated && argc > ap_php_optind) { - SG(request_info).path_translated = estrdup(argv[ap_php_optind]); + SG(request_info).path_translated = strdup(argv[ap_php_optind]); } } else { /* If for some reason the CGI interface is not setting the @@ -703,7 +703,7 @@ env_path_translated = getenv("PATH_TRANSLATED"); #endif if(env_path_translated) { - SG(request_info).path_translated = estrdup(env_path_translated); + SG(request_info).path_translated = strdup(env_path_translated); } } if (cgi || SG(request_info).path_translated) { @@ -768,15 +768,12 @@ #endif } - - if (SG(request_info).path_translated) { - persist_alloc(SG(request_info).path_translated); - } - php_request_shutdown((void *) 0); php_module_shutdown(); - STR_FREE(SG(request_info).path_translated); + if (SG(request_info).path_translated) { + free(SG(request_info).path_translated); + } if (cgi_sapi_module.php_ini_path_override) { free(cgi_sapi_module.php_ini_path_override);

« previous php.cvs (#6501) next »