summaryrefslogtreecommitdiff
path: root/Zend/zend_generators.c
diff options
context:
space:
mode:
authorNikita Popov <nikic@php.net>2016-02-11 16:22:42 +0100
committerNikita Popov <nikic@php.net>2016-02-11 16:25:16 +0100
commit1322672c0b70cf3a8f3fa64f7d6c4b52338f8b81 (patch)
tree6a5e9a7e0cca9e55e1b6d5df11ba8f9b31b106eb /Zend/zend_generators.c
parent95a47ab556a2014b6aad193dd881cc0f35f0e9c8 (diff)
downloadphp-git-1322672c0b70cf3a8f3fa64f7d6c4b52338f8b81.tar.gz
Fix dangling send target when using yield from
Also drop some unnecessary TRY_DELREFs -- leftovers from the days when null was refcounted.
Diffstat (limited to 'Zend/zend_generators.c')
-rw-r--r--Zend/zend_generators.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/Zend/zend_generators.c b/Zend/zend_generators.c
index c572a9cc35..f8087fc943 100644
--- a/Zend/zend_generators.c
+++ b/Zend/zend_generators.c
@@ -35,11 +35,6 @@ static void zend_generator_cleanup_unfinished_execution(zend_generator *generato
{
zend_execute_data *execute_data = generator->execute_data;
- if (generator->send_target) {
- Z_TRY_DELREF_P(generator->send_target);
- generator->send_target = NULL;
- }
-
if (execute_data->opline != execute_data->func->op_array.opcodes) {
/* -1 required because we want the last run opcode, not the next to-be-run one. */
uint32_t op_num = execute_data->opline - execute_data->func->op_array.opcodes - 1;
@@ -882,7 +877,6 @@ ZEND_METHOD(Generator, send)
root = zend_generator_get_current(generator);
/* Put sent value in the target VAR slot, if it is used */
if (root->send_target) {
- Z_TRY_DELREF_P(root->send_target);
ZVAL_COPY(root->send_target, value);
}