Skip to content

Commit

Permalink
Replace ZEPHIR_OBS_COPY_OR_DUP() macro with ZVAL_COPY()
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeckerson committed Nov 26, 2023
1 parent 26e6b33 commit 86e5168
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions kernel/memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,6 @@ int zephir_set_symbol(zval *key_name, zval *value);
} \
ZVAL_DUP(d, v);

#define ZEPHIR_OBS_COPY_OR_DUP(z, v) \
ZVAL_COPY(z, v);

#define ZEPHIR_HASH_COPY(z, v) \
if (Z_TYPE_P(z) == IS_ARRAY && Z_TYPE_P(v) == IS_ARRAY) { \
zend_hash_copy(Z_ARRVAL_P(z), Z_ARRVAL_P(v), (copy_ctor_func_t) zval_add_ref); \
Expand Down
2 changes: 1 addition & 1 deletion src/Backend/Backend.php
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ public function assignZval(Variable $variable, $code, CompilationContext $contex
if (!$variable->isDoublePointer()) {
$context->symbolTable->mustGrownStack(true);
$symbolVariable = $this->getVariableCode($variable);
$context->codePrinter->output('ZEPHIR_OBS_COPY_OR_DUP('.$symbolVariable.', '.$code.');');
$context->codePrinter->output('ZVAL_COPY('.$symbolVariable.', '.$code.');');
} else {
$context->codePrinter->output($variable->getName().' = '.$code.';');
}
Expand Down

0 comments on commit 86e5168

Please sign in to comment.