Skip to content

Commit

Permalink
#2186 - Fix zephir_get_strval macro
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeckerson committed Apr 7, 2021
1 parent efbba3b commit abdf616
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions kernels/ZendEngine3/operators.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,15 +194,16 @@ long zephir_safe_mod_double_zval(double op1, zval *op2);
} \
}


/**
* TODO: Re-visit IS_NULL check, when ZEND_PARSE_PARAMETERS_* will be in better condition in Zephir
*/
#define zephir_get_strval(left, right) \
{ \
int use_copy_right; \
zval right_tmp; \
if (Z_TYPE_P(right) == IS_STRING) { \
ZEPHIR_CPY_WRT(left, right); \
} else if (Z_TYPE_P(right) == IS_NULL) { \
// TODO: Re-visit this check, when ZEND_PARSE_PARAMETERS_* will be in better condition in Zephir
ZEPHIR_INIT_VAR(left); \
} else { \
use_copy_right = zephir_make_printable_zval(right, &right_tmp); \
Expand Down

0 comments on commit abdf616

Please sign in to comment.