From: Xinchen Hui Date: Sat, 24 May 2014 13:19:34 +0000 (+0800) Subject: Added folder mark and codes style X-Git-Tag: POST_PHPNG_MERGE~301 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=60e01e5d643056c9320de2ea2ee3f5396038b50e;p=php Added folder mark and codes style --- diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index a1554164a0..f90412ac45 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -1078,7 +1078,7 @@ ZEND_API int mul_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ * } /* }}} */ -ZEND_API int pow_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) +ZEND_API int pow_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */ { zval op1_copy, op2_copy; int converted = 0; @@ -1160,6 +1160,7 @@ ZEND_API int pow_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) } } } +/* }}} */ ZEND_API int div_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */ { @@ -2507,12 +2508,11 @@ ZEND_API zend_string *zend_long_to_str(long num) /* {{{ */ { char buf[MAX_LENGTH_OF_LONG + 1]; char *res; - _zend_print_signed_to_buf(buf + sizeof(buf)-1, num, unsigned long, res); - return STR_INIT(res, buf + sizeof(buf)-1 - res, 0); + _zend_print_signed_to_buf(buf + sizeof(buf) - 1, num, unsigned long, res); + return STR_INIT(res, buf + sizeof(buf) - 1 - res, 0); } /* }}} */ - /* * Local variables: * tab-width: 4 diff --git a/Zend/zend_operators.h b/Zend/zend_operators.h index d61fbc2647..1192e111c6 100644 --- a/Zend/zend_operators.h +++ b/Zend/zend_operators.h @@ -965,25 +965,25 @@ static zend_always_inline void fast_is_not_identical_function(zval *result, zval } /* input: buf points to the END of the buffer */ -#define _zend_print_unsigned_to_buf(buf, num, vartype, result) do { \ - char *__p = (buf); \ - vartype __num = (num); \ - *__p = '\0'; \ - do { \ - *--__p = (char) (__num % 10) + '0'; \ - __num /= 10; \ - } while (__num > 0); \ - result = __p; \ +#define _zend_print_unsigned_to_buf(buf, num, vartype, result) do { \ + char *__p = (buf); \ + vartype __num = (num); \ + *__p = '\0'; \ + do { \ + *--__p = (char) (__num % 10) + '0'; \ + __num /= 10; \ + } while (__num > 0); \ + result = __p; \ } while (0) /* buf points to the END of the buffer */ -#define _zend_print_signed_to_buf(buf, num, vartype, result) do { \ - if (num < 0) { \ - _zend_print_unsigned_to_buf((buf), -(vartype)(num), vartype, (result)); \ - *--(result) = '-'; \ - } else { \ - _zend_print_unsigned_to_buf((buf), (num), vartype, (result)); \ - } \ +#define _zend_print_signed_to_buf(buf, num, vartype, result) do { \ + if (num < 0) { \ + _zend_print_unsigned_to_buf((buf), -(vartype)(num), vartype, (result)); \ + *--(result) = '-'; \ + } else { \ + _zend_print_unsigned_to_buf((buf), (num), vartype, (result)); \ + } \ } while (0) ZEND_API zend_string *zend_long_to_str(long num);