|
143 | 143 | # define ADD_ASSOC_INT64(zval, key, value) add_assoc_long(zval, key, value) |
144 | 144 | #elif SIZEOF_PHONGO_LONG == 4 |
145 | 145 | # define ADD_INDEX_INT64(zval, index, value) \ |
146 | | - if (value > INT32_MAX || value < INT32_MIN) { \ |
147 | | - phongo_throw_exception(PHONGO_ERROR_INVALID_ARGUMENT TSRMLS_CC, "Integer overflow detected on your platform: %lld", value); \ |
| 146 | + if ((value) > INT32_MAX || (value) < INT32_MIN) { \ |
| 147 | + phongo_throw_exception(PHONGO_ERROR_INVALID_ARGUMENT TSRMLS_CC, "Integer overflow detected on your platform: %lld", (value)); \ |
148 | 148 | } else { \ |
149 | | - add_index_long(zval, index, value); \ |
| 149 | + add_index_long(zval, index, (value)); \ |
150 | 150 | } |
151 | 151 | # define ADD_NEXT_INDEX_INT64(zval, value) \ |
152 | | - if (value > INT32_MAX || value < INT32_MIN) { \ |
153 | | - phongo_throw_exception(PHONGO_ERROR_INVALID_ARGUMENT TSRMLS_CC, "Integer overflow detected on your platform: %lld", value); \ |
| 152 | + if ((value) > INT32_MAX || (value) < INT32_MIN) { \ |
| 153 | + phongo_throw_exception(PHONGO_ERROR_INVALID_ARGUMENT TSRMLS_CC, "Integer overflow detected on your platform: %lld", (value)); \ |
154 | 154 | } else { \ |
155 | | - add_next_index_long(zval, value); \ |
| 155 | + add_next_index_long(zval, (value)); \ |
156 | 156 | } |
157 | 157 | # define ADD_ASSOC_INT64(zval, key, value) \ |
158 | | - if (value > INT32_MAX || value < INT32_MIN) { \ |
159 | | - phongo_throw_exception(PHONGO_ERROR_INVALID_ARGUMENT TSRMLS_CC, "Integer overflow detected on your platform: %lld", value); \ |
| 158 | + if ((value) > INT32_MAX || (value) < INT32_MIN) { \ |
| 159 | + phongo_throw_exception(PHONGO_ERROR_INVALID_ARGUMENT TSRMLS_CC, "Integer overflow detected on your platform: %lld", (value)); \ |
160 | 160 | } else { \ |
161 | | - add_assoc_long(zval, key, value); \ |
| 161 | + add_assoc_long(zval, key, (value)); \ |
162 | 162 | } |
163 | 163 | #else |
164 | 164 | # error Unsupported architecture (integers are neither 32-bit nor 64-bit) |
|
0 commit comments