X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=apc_cache.c;fp=apc_cache.c;h=a837871d08e753e27883496f3859afcebf02a178;hb=10aea07a14325aa0bfb5fe75ddcf19432c6e2c64;hp=62d5f8b9822b20eaf65df393ecddd264bb2af78f;hpb=3682e0a7a26931aabca2b6e54eb08efd7dc0430b;p=php5-apc.git diff --git a/apc_cache.c b/apc_cache.c index 62d5f8b..a837871 100644 --- a/apc_cache.c +++ b/apc_cache.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | APC | +----------------------------------------------------------------------+ - | Copyright (c) 2006 The PHP Group | + | Copyright (c) 2008 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -28,7 +28,7 @@ */ -/* $Id: apc_cache.c,v 3.145.2.2 2008/03/25 18:24:57 gopalv Exp $ */ +/* $Id: apc_cache.c,v 3.145.2.4 2008/05/11 18:57:00 rasmus Exp $ */ #include "apc_cache.h" #include "apc_lock.h" @@ -54,8 +54,6 @@ #define key_equals(a, b) (a.inode==b.inode && a.device==b.device) /* }}} */ -static void apc_cache_expunge(apc_cache_t* cache, size_t size); - /* {{{ hash */ static unsigned int hash(apc_cache_key_t key) { @@ -265,7 +263,6 @@ apc_cache_t* apc_cache_create(int size_hint, int gc_ttl, int ttl) for (i = 0; i < num_slots; i++) { cache->slots[i] = NULL; } - cache->expunge_cb = apc_cache_expunge; return cache; } @@ -307,21 +304,9 @@ void apc_cache_clear(apc_cache_t* cache) /* }}} */ /* {{{ apc_cache_expunge */ -static void apc_cache_expunge(apc_cache_t* cache, size_t size) +void apc_cache_expunge(apc_cache_t* cache, time_t t) { int i; - time_t t; - TSRMLS_FETCH(); - -#if PHP_API_VERSION < 20041225 -#if HAVE_APACHE && defined(APC_PHP4_STAT) - t = ((request_rec *)SG(server_context))->request_time; -#else - t = time(0); -#endif -#else - t = sapi_get_request_time(TSRMLS_C); -#endif if(!cache) return;