]> granicus.if.org Git - php/commitdiff
[Math] ceil, floor added FAST_ZPP parameters pass
authorDmitry Patsura <zaets28rus@gmail.com>
Tue, 19 May 2015 13:19:13 +0000 (21:19 +0800)
committerDmitry Patsura <zaets28rus@gmail.com>
Tue, 19 May 2015 13:19:13 +0000 (21:19 +0800)
ext/standard/math.c

index a3685c00b93410a768a3252f580fc93d3d59e920..1ae74f80490b15a3711cdd7e3cb8f8ab68f0f1b1 100644 (file)
@@ -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) {