com php-src: Fixed compatibility with php-5.2: ext/opcache/Opti mizer/zend_optimizer_internal.h
| From: | Dmitry Stogov | Date: | Thu, 29 Aug 2013 06:44:07 +0000 |
| Subject: | com php-src: Fixed compatibility with php-5.2: ext/opcache/Opti mizer/zend_optimizer_internal.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-73128@lists.php.net to get a copy of this message | ||
Commit: 94816ed9bfe16bd1507a1abc708793e41c06ad79
Author: Dmitry Stogov <dmitry@zend.com> Thu, 29 Aug 2013 10:44:07 +0400
Parents: 632f733ce4d31f7a46e1d70b9454dcb12a98b089
Branches: PHP-5.5 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=94816ed9bfe16bd1507a1abc708793e41c06ad79
Log:
Fixed compatibility with php-5.2
Changed paths:
M ext/opcache/Optimizer/zend_optimizer_internal.h
Diff:
diff --git a/ext/opcache/Optimizer/zend_optimizer_internal.h
b/ext/opcache/Optimizer/zend_optimizer_internal.h
index 0b1afba..616bdf7 100644
--- a/ext/opcache/Optimizer/zend_optimizer_internal.h
+++ b/ext/opcache/Optimizer/zend_optimizer_internal.h
@@ -27,9 +27,12 @@
#if ZEND_EXTENSION_API_NO > PHP_5_4_X_API_NO
# define VAR_NUM(v) ((zend_uint)(EX_TMP_VAR_NUM(0, 0) - EX_TMP_VAR(0, v)))
# define NUM_VAR(v) ((zend_uint)(zend_uintptr_t)EX_TMP_VAR_NUM(0, v))
-#else
+#elif ZEND_EXTENSION_API_NO > PHP_5_2_X_API_NO
# define VAR_NUM(v) ((v)/ZEND_MM_ALIGNED_SIZE(sizeof(temp_variable)))
# define NUM_VAR(v) ((v)*ZEND_MM_ALIGNED_SIZE(sizeof(temp_variable)))
+#else
+# define VAR_NUM(v) ((v)/(sizeof(temp_variable)))
+# define NUM_VAR(v) ((v)*(sizeof(temp_variable)))
#endif
#define INV_COND(op) ((op) == ZEND_JMPZ ? ZEND_JMPNZ : ZEND_JMPZ)