cvs: pecl /apc apc_cache.c apc_cache.h apc_sem.c php_apc.c

From: Date: Tue, 14 Sep 2004 04:35:27 +0000
Subject: cvs: pecl /apc apc_cache.c apc_cache.h apc_sem.c php_apc.c
Groups: php.pecl.cvs 
Request: Send a blank email to pecl-cvs+get-1831@lists.php.net to get a copy of this message
rasmus Tue Sep 14 00:35:27 2004 EDT Modified files: /pecl/apc apc_cache.c apc_cache.h apc_sem.c php_apc.c Log: Populating the time_t before I use it works better. And add a missing prototype. http://cvs.php.net/diff.php/pecl/apc/apc_cache.c?r1=3.69&r2=3.70&ty=u Index: pecl/apc/apc_cache.c diff -u pecl/apc/apc_cache.c:3.69 pecl/apc/apc_cache.c:3.70 --- pecl/apc/apc_cache.c:3.69 Sun Sep 12 10:31:44 2004 +++ pecl/apc/apc_cache.c Tue Sep 14 00:35:27 2004 @@ -15,7 +15,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: apc_cache.c,v 3.69 2004/09/12 14:31:44 rasmus Exp $ */ +/* $Id: apc_cache.c,v 3.70 2004/09/14 04:35:27 rasmus Exp $ */ #include "apc_cache.h" #include "apc_lock.h" @@ -532,7 +532,7 @@ /* }}} */ /* {{{ apc_cache_make_user_key */ -int apc_cache_make_user_key(apc_cache_key_t* key, const char* identifier, const time_t t TSRMLS_DC) +int apc_cache_make_user_key(apc_cache_key_t* key, const char* identifier, const time_t t) { assert(key != NULL); http://cvs.php.net/diff.php/pecl/apc/apc_cache.h?r1=3.20&r2=3.21&ty=u Index: pecl/apc/apc_cache.h diff -u pecl/apc/apc_cache.h:3.20 pecl/apc/apc_cache.h:3.21 --- pecl/apc/apc_cache.h:3.20 Sun Sep 12 10:31:44 2004 +++ pecl/apc/apc_cache.h Tue Sep 14 00:35:27 2004 @@ -14,7 +14,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: apc_cache.h,v 3.20 2004/09/12 14:31:44 rasmus Exp $ */ +/* $Id: apc_cache.h,v 3.21 2004/09/14 04:35:27 rasmus Exp $ */ #ifndef APC_CACHE_H #define APC_CACHE_H @@ -186,6 +186,8 @@ * and the zval to be stored. */ extern apc_cache_entry_t* apc_cache_make_user_entry(const char* info, const zval *val, const unsigned int ttl); + +extern int apc_cache_make_user_key(apc_cache_key_t* key, const char* identifier, const time_t t); /* * Frees all memory associated with an object returned by apc_cache_make_entry http://cvs.php.net/diff.php/pecl/apc/apc_sem.c?r1=3.12&r2=3.13&ty=u Index: pecl/apc/apc_sem.c diff -u pecl/apc/apc_sem.c:3.12 pecl/apc/apc_sem.c:3.13 --- pecl/apc/apc_sem.c:3.12 Thu Apr 15 23:54:47 2004 +++ pecl/apc/apc_sem.c Tue Sep 14 00:35:27 2004 @@ -14,7 +14,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: apc_sem.c,v 3.12 2004/04/16 03:54:47 gschlossnagle Exp $ */ +/* $Id: apc_sem.c,v 3.13 2004/09/14 04:35:27 rasmus Exp $ */ #include "apc_sem.h" #include "apc.h" @@ -35,8 +35,8 @@ /* Linux specific part: */ struct seminfo *__buf; /* buffer for IPC_INFO */ }; -#endif #define HAVE_SEMUN 1 +#endif #ifndef SEM_R # define SEM_R 0444 http://cvs.php.net/diff.php/pecl/apc/php_apc.c?r1=3.37&r2=3.38&ty=u Index: pecl/apc/php_apc.c diff -u pecl/apc/php_apc.c:3.37 pecl/apc/php_apc.c:3.38 --- pecl/apc/php_apc.c:3.37 Sun Sep 12 10:31:44 2004 +++ pecl/apc/php_apc.c Tue Sep 14 00:35:27 2004 @@ -15,7 +15,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_apc.c,v 3.37 2004/09/12 14:31:44 rasmus Exp $ */ +/* $Id: php_apc.c,v 3.38 2004/09/14 04:35:27 rasmus Exp $ */ #ifdef PHP_WIN32 /* XXX lame hack, for some reason, the ini entries are all messed @@ -125,7 +125,7 @@ #else php_info_print_table_row(2, "MMAP Support", "Disabled"); #endif - php_info_print_table_row(2, "Revision", "$Revision: 3.37 $"); + php_info_print_table_row(2, "Revision", "$Revision: 3.38 $"); php_info_print_table_row(2, "Build Date", __DATE__ " " __TIME__); DISPLAY_INI_ENTRIES(); php_info_print_table_end(); @@ -347,11 +347,6 @@ return 0; } - if (!apc_cache_make_user_key(&key, strkey TSRMLS_CC)) { - apc_cache_free_entry(entry); - return 1; - } - #if HAVE_APACHE /* Save a syscall here under Apache. This should actually be a SAPI call instead * but we don't have that yet. Once that is introduced in PHP this can be cleaned up -Rasmus */ @@ -359,6 +354,11 @@ #else t = time(0); #endif + + if (!apc_cache_make_user_key(&key, strkey, t)) { + apc_cache_free_entry(entry); + return 1; + } if (!apc_cache_user_insert(APCG(user_cache), key, entry, t)) { apc_cache_free_user_key(&key);

« previous php.pecl.cvs (#1831) next »