Skip to content

Commit bb47358

Browse files
committed
Move FCC GC function out of zend_gc.h
1 parent 0b5331b commit bb47358

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

Zend/zend_API.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -760,6 +760,18 @@ static zend_always_inline void zend_fcc_dtor(zend_fcall_info_cache *fcc)
760760

761761
ZEND_API void zend_get_callable_zval_from_fcc(const zend_fcall_info_cache *fcc, zval *callable);
762762

763+
/* Moved out of zend_gc.h because zend_fcall_info_cache is an unknown type in that header */
764+
static zend_always_inline void zend_get_gc_buffer_add_fcc(zend_get_gc_buffer *gc_buffer, zend_fcall_info_cache *fcc)
765+
{
766+
ZEND_ASSERT(ZEND_FCC_INITIALIZED(*fcc));
767+
if (fcc->object) {
768+
zend_get_gc_buffer_add_obj(gc_buffer, fcc->object);
769+
}
770+
if (fcc->closure) {
771+
zend_get_gc_buffer_add_obj(gc_buffer, fcc->closure);
772+
}
773+
}
774+
763775
/* Can only return FAILURE if EG(active) is false during late engine shutdown.
764776
* If the call or call setup throws, EG(exception) will be set and the retval
765777
* will be UNDEF. Otherwise, the retval will be a non-UNDEF value. */

Zend/zend_gc.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -127,17 +127,6 @@ static zend_always_inline void zend_get_gc_buffer_add_hashtable(zend_get_gc_buff
127127
gc_buffer->cur++;
128128
}
129129

130-
static zend_always_inline void zend_get_gc_buffer_add_fcc(zend_get_gc_buffer *gc_buffer, zend_fcall_info_cache *fcc)
131-
{
132-
ZEND_ASSERT(ZEND_FCC_INITIALIZED(*fcc));
133-
if (fcc->object) {
134-
zend_get_gc_buffer_add_obj(gc_buffer, fcc->object);
135-
}
136-
if (fcc->closure) {
137-
zend_get_gc_buffer_add_obj(gc_buffer, fcc->closure);
138-
}
139-
}
140-
141130
static zend_always_inline void zend_get_gc_buffer_use(
142131
zend_get_gc_buffer *gc_buffer, zval **table, int *n) {
143132
*table = gc_buffer->start;

0 commit comments

Comments
 (0)