]> granicus.if.org Git - php/commitdiff
Merge branch 'master' into rc_debug
authorDmitry Stogov <dmitry@zend.com>
Fri, 27 Oct 2017 11:59:09 +0000 (14:59 +0300)
committerDmitry Stogov <dmitry@zend.com>
Fri, 27 Oct 2017 11:59:09 +0000 (14:59 +0300)
* master:
  Use per-request heap instead of system one
  Extend zend_register_class_alias_ex() with additional argument to allow creating persistent or per-request aliases
  Makrk persistent resources and references with GC_PERSISTENT flag

1  2 
Zend/zend_API.h
Zend/zend_execute_API.c
Zend/zend_types.h
main/streams/streams.c

diff --cc Zend/zend_API.h
Simple merge
Simple merge
index 56217d579e55276710f2294ee2e0bec28e3507ea,159fc0f81d20e8681091208a9c608e216665a53e..9b9c578e204da6ce0cf5a2125c508cef8dd5f4a1
@@@ -771,8 -765,9 +771,9 @@@ static zend_always_inline zend_uchar zv
                zend_resource *_res =                                                                   \
                (zend_resource *) malloc(sizeof(zend_resource));                \
                zval *__z;                                                                                              \
 -              GC_REFCOUNT(_res) = 1;                                                                  \
 +              GC_SET_REFCOUNT(_res, 1);                                                               \
-               GC_TYPE_INFO(_res) = IS_RESOURCE;                                               \
+               GC_TYPE_INFO(_res) = IS_RESOURCE |                                              \
+                       (GC_PERSISTENT << GC_FLAGS_SHIFT);                                      \
                _res->handle = (h);                                                                             \
                _res->type = (t);                                                                               \
                _res->ptr = (p);                                                                                \
  #define ZVAL_NEW_PERSISTENT_REF(z, r) do {                                            \
                zend_reference *_ref =                                                                  \
                (zend_reference *) malloc(sizeof(zend_reference));              \
 -              GC_REFCOUNT(_ref) = 1;                                                                  \
 +              GC_SET_REFCOUNT(_ref, 1);                                                               \
-               GC_TYPE_INFO(_ref) = IS_REFERENCE;                                              \
+               GC_TYPE_INFO(_ref) = IS_REFERENCE |                                             \
+                       (GC_PERSISTENT << GC_FLAGS_SHIFT);                                      \
                ZVAL_COPY_VALUE(&_ref->val, r);                                                 \
                Z_REF_P(z) = _ref;                                                                              \
                Z_TYPE_INFO_P(z) = IS_REFERENCE_EX;                                             \
Simple merge