Skip to content

Commit 2461983

Browse files
committed
Move FCC GC function out of zend_gc.h
1 parent b9b1d62 commit 2461983

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
@@ -769,6 +769,18 @@ static zend_always_inline void zend_fcc_dtor(zend_fcall_info_cache *fcc)
769769

770770
ZEND_API void zend_get_callable_zval_from_fcc(const zend_fcall_info_cache *fcc, zval *callable);
771771

772+
/* Moved out of zend_gc.h because zend_fcall_info_cache is an unknown type in that header */
773+
static zend_always_inline void zend_get_gc_buffer_add_fcc(zend_get_gc_buffer *gc_buffer, zend_fcall_info_cache *fcc)
774+
{
775+
ZEND_ASSERT(ZEND_FCC_INITIALIZED(*fcc));
776+
if (fcc->object) {
777+
zend_get_gc_buffer_add_obj(gc_buffer, fcc->object);
778+
}
779+
if (fcc->closure) {
780+
zend_get_gc_buffer_add_obj(gc_buffer, fcc->closure);
781+
}
782+
}
783+
772784
/* Can only return FAILURE if EG(active) is false during late engine shutdown.
773785
* If the call or call setup throws, EG(exception) will be set and the retval
774786
* 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)