com php-src: [Math] ceil, floor added FAST_ZPP parameters pass: ext/standard/math.c
| From: | Xinchen Hui | Date: | Tue, 19 May 2015 13:19:13 +0000 |
| Subject: | com php-src: [Math] ceil, floor added FAST_ZPP parameters pass: ext/standard/math.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-86816@lists.php.net to get a copy of this message | ||
Commit: b6f8b4e949e6877f1e3e7ba5bdb653fa113936b0
Author: Dmitry Patsura <zaets28rus@gmail.com> Tue, 19 May 2015 21:19:13 +0800
Parents: eebab8282b38ca6ff77d3b878aba8fbb9fc89f66
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=b6f8b4e949e6877f1e3e7ba5bdb653fa113936b0
Log:
[Math] ceil, floor added FAST_ZPP parameters pass
Changed paths:
M ext/standard/math.c
Diff:
diff --git a/ext/standard/math.c b/ext/standard/math.c
index a3685c0...1ae74f8 100644
--- a/ext/standard/math.c
+++ b/ext/standard/math.c
@@ -327,9 +327,16 @@ PHP_FUNCTION(ceil)
{
zval *value;
+#ifndef FAST_ZPP
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &value) == FAILURE) {
return;
}
+#else
+ ZEND_PARSE_PARAMETERS_START(1, 1)
+ Z_PARAM_ZVAL(value)
+ ZEND_PARSE_PARAMETERS_END();
+#endif
+
convert_scalar_to_number_ex(value);
if (Z_TYPE_P(value) == IS_DOUBLE) {
@@ -347,9 +354,16 @@ PHP_FUNCTION(floor)
{
zval *value;
+#ifndef FAST_ZPP
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &value) == FAILURE) {
return;
}
+#else
+ ZEND_PARSE_PARAMETERS_START(1, 1)
+ Z_PARAM_ZVAL(value)
+ ZEND_PARSE_PARAMETERS_END();
+#endif
+
convert_scalar_to_number_ex(value);
if (Z_TYPE_P(value) == IS_DOUBLE) {