com php-src: Avoid unnecessary code and change the type of accelerator_enabled: zend_accelerator_module.c
| From: | Dmitry Stogov | Date: | Wed, 13 Feb 2013 19:25:38 +0000 |
| Subject: | com php-src: Avoid unnecessary code and change the type of accelerator_enabled: zend_accelerator_module.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-71566@lists.php.net to get a copy of this message | ||
Commit: 30c3a59668e4def67d29c86d5a43eda134714857
Author: Pierrick Charron <pierrick@webstart.fr> Wed, 13 Feb 2013 14:25:38 -0500
Parents: 7334835143cf3a3907337e5f8b718252d870ea74
Branches: PHP-5.5 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=30c3a59668e4def67d29c86d5a43eda134714857
Log:
Avoid unnecessary code and change the type of accelerator_enabled
accelerator_enabled will always be true when accelerator_get_status
returns an array. Also the accelerator_enabled should be a boolean
and not a long
Changed paths:
M zend_accelerator_module.c
Diff:
diff --git a/zend_accelerator_module.c b/zend_accelerator_module.c
index 41ae426..807c244 100644
--- a/zend_accelerator_module.c
+++ b/zend_accelerator_module.c
@@ -470,7 +470,7 @@ static ZEND_FUNCTION(accelerator_get_status)
array_init(return_value);
/* Trivia */
- add_assoc_long(return_value, "accelerator_enabled", ZCG(startup_ok) &&
ZCSG(accelerator_enabled));
+ add_assoc_bool(return_value, "accelerator_enabled", 1);
add_assoc_bool(return_value, "cache_full", ZSMMG(memory_exhausted));
/* Memory usage statistics */