cvs: pecl /apc apc_main.c apc_main.h
| From: | Brian Shire | Date: | Mon, 24 Mar 2008 01:07:15 +0000 |
| Subject: | cvs: pecl /apc apc_main.c apc_main.h | ||
| Groups: | php.pecl.cvs | ||
| Request: | Send a blank email to pecl-cvs+get-10042@lists.php.net to get a copy of this message | ||
shire Mon Mar 24 01:07:15 2008 UTC
Modified files:
/pecl/apc apc_main.c apc_main.h
Log:
cleanup code a little, and make apc_deactivate a static function (not used anywhere)
http://cvs.php.net/viewvc.cgi/pecl/apc/apc_main.c?r1=3.109&r2=3.110&diff_format=u
Index: pecl/apc/apc_main.c
diff -u pecl/apc/apc_main.c:3.109 pecl/apc/apc_main.c:3.110
--- pecl/apc/apc_main.c:3.109 Mon Mar 24 01:01:25 2008
+++ pecl/apc/apc_main.c Mon Mar 24 01:07:14 2008
@@ -28,7 +28,7 @@
*/
-/* $Id: apc_main.c,v 3.109 2008/03/24 01:01:25 shire Exp $ */
+/* $Id: apc_main.c,v 3.110 2008/03/24 01:07:14 shire Exp $ */
#include "apc_php.h"
#include "apc_main.h"
@@ -562,37 +562,8 @@
}
/* }}} */
-/* {{{ request init and shutdown */
-
-int apc_request_init(TSRMLS_D)
-{
- apc_stack_clear(APCG(cache_stack));
- APCG(slam_rand) = -1;
- APCG(copied_zvals) = NULL;
-
-#ifdef APC_FILEHITS
- ALLOC_INIT_ZVAL(APCG(filehits));
- array_init(APCG(filehits));
-#endif
-
- return 0;
-}
-
-int apc_request_shutdown(TSRMLS_D)
-{
- apc_deactivate(TSRMLS_C);
-
-#ifdef APC_FILEHITS
- zval_ptr_dtor(&APCG(filehits));
-#endif
-
- return 0;
-}
-
-/* }}} */
-
/* {{{ apc_deactivate */
-void apc_deactivate(TSRMLS_D)
+static void apc_deactivate(TSRMLS_D)
{
zend_uint *refcount_p;
/* The execution stack was unwound, which prevented us from decrementing
@@ -646,6 +617,36 @@
}
/* }}} */
+/* {{{ request init and shutdown */
+
+int apc_request_init(TSRMLS_D)
+{
+ apc_stack_clear(APCG(cache_stack));
+ APCG(slam_rand) = -1;
+ APCG(copied_zvals) = NULL;
+
+#ifdef APC_FILEHITS
+ ALLOC_INIT_ZVAL(APCG(filehits));
+ array_init(APCG(filehits));
+#endif
+
+ return 0;
+}
+
+int apc_request_shutdown(TSRMLS_D)
+{
+ apc_deactivate(TSRMLS_C);
+
+#ifdef APC_FILEHITS
+ zval_ptr_dtor(&APCG(filehits));
+#endif
+
+ return 0;
+}
+
+/* }}} */
+
+
/*
* Local variables:
* tab-width: 4
http://cvs.php.net/viewvc.cgi/pecl/apc/apc_main.h?r1=3.9&r2=3.10&diff_format=u
Index: pecl/apc/apc_main.h
diff -u pecl/apc/apc_main.h:3.9 pecl/apc/apc_main.h:3.10
--- pecl/apc/apc_main.h:3.9 Wed Feb 28 01:15:18 2007
+++ pecl/apc/apc_main.h Mon Mar 24 01:07:14 2008
@@ -29,7 +29,7 @@
*/
-/* $Id: apc_main.h,v 3.9 2007/02/28 01:15:18 gopalv Exp $ */
+/* $Id: apc_main.h,v 3.10 2008/03/24 01:07:14 shire Exp $ */
#ifndef APC_MAIN_H
#define APC_MAIN_H
@@ -45,16 +45,6 @@
extern int apc_request_init(TSRMLS_D);
extern int apc_request_shutdown(TSRMLS_D);
-/*
- * apc_deactivate is called by the PHP interpreter when an "exception" is
- * raised (e.g., a call to the exit function) that unwinds the execution
- * stack.
- */
-extern void apc_deactivate();
-
-
-extern const char* apc_version();
-
#endif
/*