Skip to content
Browse files

Get rid of a stray time() syscall in tsrm and clean up lcg rinit

  • Loading branch information...
1 parent ffd09c0 commit 7e5f0a8380ca26bf7950873aab733c0816d83d07 @rlerdorf rlerdorf committed
Showing with 3 additions and 2 deletions.
  1. +1 −0 NEWS
  2. +2 −1 TSRM/tsrm_virtual_cwd.c
  3. +0 −1 ext/standard/php_lcg.h
View
1 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)
View
3 TSRM/tsrm_virtual_cwd.c
@@ -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;
View
1 ext/standard/php_lcg.h
@@ -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)

0 comments on commit 7e5f0a8

Please sign in to comment.
Something went wrong with that request. Please try again.