com php-src: Fixed compatibility with php-5.2: ext/opcache/Opti mizer/zend_optimizer_internal.h
| From: | Anatol Belski | Date: | Wed, 16 Oct 2013 08:19:17 +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-73554@lists.php.net to get a copy of this message | ||
Commit: 08c2e821cc9e548f5673e59c46799d78ad43d0b0
Author: Dmitry Stogov <dmitry@zend.com> Thu, 29 Aug 2013 10:44:07 +0400
Committer: Anatol Belski <ab@php.net> Wed, 16 Oct 2013 01:19:17 -0700
Parents: 5352788b442d39181fdfb2a10f80bca2f06f2933
Branches: str_size_and_int64
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=08c2e821cc9e548f5673e59c46799d78ad43d0b0
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)