diff options
author | Dmitry Stogov <dmitry@zend.com> | 2017-11-01 15:19:31 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2017-11-01 15:19:31 +0300 |
commit | 67d5f39a47b15e28293d9d6558b80ded049179fe (patch) | |
tree | e8f11a2a68bb06f259e8e3eeed5b102884df9fa6 /main/streams/streams.c | |
parent | f5664a149260ed4a83aa5cfb13ad11ed18c56af6 (diff) | |
download | php-git-67d5f39a47b15e28293d9d6558b80ded049179fe.tar.gz |
Persistent resources are "thread-local".
Register persistent resources through new functions zend_register_persistent_resource()/zend_register_persistent_resource_ex().
Diffstat (limited to 'main/streams/streams.c')
-rw-r--r-- | main/streams/streams.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/main/streams/streams.c b/main/streams/streams.c index 7f130fcb15..1c3a144e9b 100644 --- a/main/streams/streams.c +++ b/main/streams/streams.c @@ -296,12 +296,7 @@ fprintf(stderr, "stream_alloc: %s:%p persistent=%s\n", ops->label, ret, persiste } if (persistent_id) { - zval tmp; - - ZVAL_NEW_PERSISTENT_RES(&tmp, -1, ret, le_pstream); - - if (NULL == zend_hash_str_update(&EG(persistent_list), persistent_id, - strlen(persistent_id), &tmp)) { + if (NULL == zend_register_persistent_resource(persistent_id, strlen(persistent_id), ret, le_pstream)) { pefree(ret, 1); return NULL; } |