n. ZEND_ENGINE_2 removal
o. Updated final class modifier
p. TSRM changes
+ q. gc_collect_cycles() is now hookable
2. Build system changes
a. Unix build system changes
Additionally, if an extension triggers its own threads, TSRMLS_CACHE shouldn't
be passed to that threads directly.
+ q. gc_collect_cycles() is now a function pointer, and can be replaced in the
+ same manner as zend_execute_ex() if needed (for example, to include the
+ time spent in the garbage collector in a profiler). The default
+ implementation has been renamed to zend_gc_collect_cycles(), and is
+ exported with ZEND_API.
+
========================
2. Build system changes
zend_compile_string = compile_string;
zend_throw_exception_hook = NULL;
+ /* Set up the default garbage collection implementation. */
+ gc_collect_cycles = zend_gc_collect_cycles;
+
zend_init_opcodes_handlers();
/* set up version */
ZEND_API zend_gc_globals gc_globals;
#endif
+ZEND_API int (*gc_collect_cycles)(TSRMLS_D);
+
#define GC_REMOVE_FROM_ROOTS(current) \
gc_remove_from_roots((current))
}
}
-ZEND_API int gc_collect_cycles(void)
+ZEND_API int zend_gc_collect_cycles(void)
{
int count = 0;
#endif
BEGIN_EXTERN_C()
-ZEND_API int gc_collect_cycles(void);
+ZEND_API extern int (*gc_collect_cycles)(void);
+
ZEND_API void gc_possible_root(zend_refcounted *ref);
ZEND_API void gc_remove_from_buffer(zend_refcounted *ref);
ZEND_API void gc_globals_ctor(void);
ZEND_API void gc_globals_dtor(void);
ZEND_API void gc_init(void);
ZEND_API void gc_reset(void);
+
+/* The default implementation of the gc_collect_cycles callback. */
+ZEND_API int zend_gc_collect_cycles(void);
END_EXTERN_C()
#define GC_ZVAL_CHECK_POSSIBLE_ROOT(z) \