File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 84
84
/**
85
85
* Adds the given zval "val" to "sum".
86
86
*/
87
+ #if PHP_MAJOR_VERSION < 8 || PHP_MAJOR_VERSION == 8 && PHP_MINOR_VERSION < 3
87
88
#define DS_ADD_TO_SUM (val , sum ) \
88
89
do { \
89
90
if (Z_TYPE_P(val) == IS_LONG || Z_TYPE_P(val) == IS_DOUBLE) { \
@@ -95,6 +96,19 @@ do { \
95
96
fast_add_function(sum, sum, &_num); \
96
97
} \
97
98
} while (0)
99
+ #else
100
+ #define DS_ADD_TO_SUM (val , sum ) \
101
+ do { \
102
+ if (Z_TYPE_P(val) == IS_LONG || Z_TYPE_P(val) == IS_DOUBLE) { \
103
+ add_function(sum, sum, val); \
104
+ } else { \
105
+ zval _num; \
106
+ ZVAL_COPY(&_num, val); \
107
+ convert_scalar_to_number(&_num); \
108
+ add_function(sum, sum, &_num); \
109
+ } \
110
+ } while (0)
111
+ #endif
98
112
99
113
/**
100
114
* Used to replace a buffer with a new one.
You can’t perform that action at this time.
0 commit comments