Skip to content

Commit 0b5adb0

Browse files
committed
Address code review comments
1 parent b571762 commit 0b5adb0

File tree

3 files changed

+2
-12
lines changed

3 files changed

+2
-12
lines changed

Zend/zend_operators.c

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -605,12 +605,6 @@ ZEND_API void ZEND_FASTCALL convert_to_boolean(zval *op) /* {{{ */
605605
}
606606
/* }}} */
607607

608-
ZEND_API void ZEND_FASTCALL _convert_to_cstring(zval *op) /* {{{ */
609-
{
610-
_convert_to_string(op);
611-
}
612-
/* }}} */
613-
614608
ZEND_API void ZEND_FASTCALL _convert_to_string(zval *op) /* {{{ */
615609
{
616610
try_again:
@@ -945,9 +939,7 @@ static zend_always_inline zend_string* __zval_get_string_func(zval *op, zend_boo
945939
return zend_long_to_str(Z_LVAL_P(op));
946940
}
947941
case IS_DOUBLE: {
948-
zend_string *str = zend_strpprintf_unchecked(0, "%.*H", (int) EG(precision), Z_DVAL_P(op));
949-
950-
return str;
942+
return zend_strpprintf_unchecked(0, "%.*H", (int) EG(precision), Z_DVAL_P(op));
951943
}
952944
case IS_ARRAY:
953945
zend_error(E_WARNING, "Array to string conversion");

Zend/zend_operators.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,6 @@ ZEND_API int ZEND_FASTCALL increment_function(zval *op1);
257257
ZEND_API int ZEND_FASTCALL decrement_function(zval *op2);
258258

259259
ZEND_API void ZEND_FASTCALL convert_scalar_to_number(zval *op);
260-
ZEND_API void ZEND_FASTCALL _convert_to_cstring(zval *op);
261260
ZEND_API void ZEND_FASTCALL _convert_to_string(zval *op);
262261
ZEND_API void ZEND_FASTCALL convert_to_long(zval *op);
263262
ZEND_API void ZEND_FASTCALL convert_to_double(zval *op);
@@ -340,7 +339,6 @@ static zend_always_inline zend_bool try_convert_to_string(zval *op) {
340339
#define _zval_get_double_func(op) zval_get_double_func(op)
341340
#define _zval_get_string_func(op) zval_get_string_func(op)
342341

343-
#define convert_to_cstring(op) if (Z_TYPE_P(op) != IS_STRING) { _convert_to_cstring((op)); }
344342
#define convert_to_string(op) if (Z_TYPE_P(op) != IS_STRING) { _convert_to_string((op)); }
345343

346344

ext/pgsql/pgsql.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1987,7 +1987,7 @@ PHP_FUNCTION(pg_query_params)
19871987
zval tmp_val;
19881988

19891989
ZVAL_COPY(&tmp_val, tmp);
1990-
convert_to_cstring(&tmp_val);
1990+
convert_to_string(&tmp_val);
19911991
if (Z_TYPE(tmp_val) != IS_STRING) {
19921992
php_error_docref(NULL, E_WARNING,"Error converting parameter");
19931993
zval_ptr_dtor(&tmp_val);

0 commit comments

Comments
 (0)