]> granicus.if.org Git - php/commitdiff
Get rid of a stray time() syscall in tsrm and clean up lcg rinit
authorRasmus Lerdorf <rasmus@php.net>
Fri, 18 May 2007 11:36:55 +0000 (11:36 +0000)
committerRasmus Lerdorf <rasmus@php.net>
Fri, 18 May 2007 11:36:55 +0000 (11:36 +0000)
NEWS
TSRM/tsrm_virtual_cwd.c
ext/standard/php_lcg.h

diff --git a/NEWS b/NEWS
index 24fc07ada7199740b189399a4a8ceb57b8073094..9c802525c0c499fbfea3e5629613a79f911d525d 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,7 @@
 PHP                                                                        NEWS
 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 ?? ??? 2007, PHP 5.2.3
+- Optimized out a couple of per-request syscalls (Rasmus)
 - Upgraded SQLite 3 to version 3.3.16 (Ilia)
 - Added PDO::FETCH_KEY_PAIR mode that will fetch a 2 column result set into 
   an associated array. (Ilia)
index ccb7ea553cd57f2434d89fc5fd90d7cf61559a3e..a7d1d5972248dee6a94990580747766515f739a6 100644 (file)
@@ -31,6 +31,7 @@
 
 #include "tsrm_virtual_cwd.h"
 #include "tsrm_strtok_r.h"
+#include "SAPI.h"
 
 #ifdef TSRM_WIN32
 #include <io.h>
@@ -518,7 +519,7 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
        }
 
        if (use_cache) {
-               t = CWDG(realpath_cache_ttl)?time(NULL):0;
+               t = CWDG(realpath_cache_ttl)?sapi_get_request_time(TSRMLS_C):0;
                if ((bucket = realpath_cache_find(path, path_length, t TSRMLS_CC)) != NULL) {           
                        int len = bucket->realpath_len;
 
index b036cbce004fa22513d0cb5ba832ba8263d0d5ac..e78414ff1387bb889c807fc134c73e230dcf4041 100644 (file)
@@ -33,7 +33,6 @@ PHPAPI double php_combined_lcg(TSRMLS_D);
 PHP_FUNCTION(lcg_value);
 
 PHP_MINIT_FUNCTION(lcg);
-PHP_RINIT_FUNCTION(lcg);
 
 #ifdef ZTS
 #define LCG(v) TSRMG(lcg_globals_id, php_lcg_globals *, v)