diff options
| author | Nikita Popov <nikita.ppv@gmail.com> | 2019-03-18 10:14:03 +0100 |
|---|---|---|
| committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-03-18 10:14:03 +0100 |
| commit | 1b411c039f5c7646eb14b7920bf4fa794c982de0 (patch) | |
| tree | 3974dab65276129e697006150466519bf2135f1c | |
| parent | 51ed4a8d8f0e50a182c3697df8242356f80dd460 (diff) | |
| parent | c4464526cd8c7ef246ea4be145d798e084460d9d (diff) | |
| download | php-git-1b411c039f5c7646eb14b7920bf4fa794c982de0.tar.gz | |
Merge branch 'PHP-7.3' into PHP-7.4
| -rw-r--r-- | Zend/zend_portability.h | 8 | ||||
| -rw-r--r-- | ext/date/php_date.c | 19 |
2 files changed, 11 insertions, 16 deletions
diff --git a/Zend/zend_portability.h b/Zend/zend_portability.h index 18e312ed97..fe3f5c4245 100644 --- a/Zend/zend_portability.h +++ b/Zend/zend_portability.h @@ -444,12 +444,8 @@ char *alloca(); #define MAX(a, b) (((a)>(b))?(a):(b)) #define MIN(a, b) (((a)<(b))?(a):(b)) -/* x86 instructions BT, SHL, SHR don't require masking */ -#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) || defined(ZEND_WIN32) -# define ZEND_BIT_TEST(bits, bit) (((bits)[(bit) / (sizeof((bits)[0])*8)] >> (bit)) & 1) -#else -# define ZEND_BIT_TEST(bits, bit) (((bits)[(bit) / (sizeof((bits)[0])*8)] >> ((bit) & (sizeof((bits)[0])*8-1))) & 1) -#endif +#define ZEND_BIT_TEST(bits, bit) \ + (((bits)[(bit) / (sizeof((bits)[0])*8)] >> ((bit) & (sizeof((bits)[0])*8-1))) & 1) /* We always define a function, even if there's a macro or expression we could * alias, so that using it in contexts where we can't make function calls diff --git a/ext/date/php_date.c b/ext/date/php_date.c index ec3ead6f2a..565e018538 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -4735,20 +4735,19 @@ PHP_METHOD(DatePeriod, getDateInterval) */ PHP_METHOD(DatePeriod, getRecurrences) { - php_period_obj *dpobj; - php_date_obj *dateobj; + php_period_obj *dpobj; - if (zend_parse_parameters_none() == FAILURE) { - return; - } + if (zend_parse_parameters_none() == FAILURE) { + return; + } - dpobj = Z_PHPPERIOD_P(ZEND_THIS); + dpobj = Z_PHPPERIOD_P(ZEND_THIS); - if (0 == dpobj->recurrences - dpobj->include_start_date) { - return; - } + if (0 == dpobj->recurrences - dpobj->include_start_date) { + return; + } - RETURN_LONG(dpobj->recurrences - dpobj->include_start_date); + RETURN_LONG(dpobj->recurrences - dpobj->include_start_date); } /* }}} */ |
