Skip to content

zend_types: Convert Z_*REF*_P() macros into inline functions#22300

Open
TimWolla wants to merge 1 commit into
php:masterfrom
TimWolla:zend-types-z-ref-function
Open

zend_types: Convert Z_*REF*_P() macros into inline functions#22300
TimWolla wants to merge 1 commit into
php:masterfrom
TimWolla:zend-types-z-ref-function

Conversation

@TimWolla

Copy link
Copy Markdown
Member

No description provided.

Comment thread Zend/zend_types.h
#endif
return GC_REFCOUNT(Z_COUNTED_P(pz));
}
static zend_always_inline uint32_t Z_REFCOUNT_P(const zval *z) { return zval_refcount_p(z); }

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's worth creating inline functions for pure aliases - the type is anyway forwarded directly.

This is sort of just odd to me...

@bwoebi bwoebi Jun 14, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the try_addref_p/try_delref_p ones are fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants