Skip to content

tree: Use zend_string accessor macros consistently - #25564

Merged
Girgias merged 1 commit into
php:masterfrom
adapik:zstr-macros
Nov 20, 2026
Merged

Girgias merged 1 commit into
php:masterfrom
adapik:zstr-macros

Conversation

@adapik

@adapik adapik commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

use zend_string accessor macros whenever possible for better consistency.

The change is purely mechanical, i didn't touch code formatting and did't refactor it further. It can be addressed separately.

@Girgias Girgias left a comment

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.

Obvious follow-up in comments.

}
}
if (_zend_handle_numeric_str_ex(str->val, str->len, &idx)) {
if (_zend_handle_numeric_str_ex(ZSTR_VAL(str), ZSTR_LEN(str), &idx)) {

@Girgias Girgias Nov 19, 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.

This should really be ZEND_HANDLE_NUMERIC, actually the whole code above could be replaced by an if/else with ZEND_HANDLE_NUMERIC.

}
}
if (_zend_handle_numeric_str_ex(str->val, str->len, &idx)) {
if (_zend_handle_numeric_str_ex(ZSTR_VAL(str), ZSTR_LEN(str), &idx)) {

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.

Ditto

}
}
if (_zend_handle_numeric_str_ex(str->val, str->len, &idx)) {
if (_zend_handle_numeric_str_ex(ZSTR_VAL(str), ZSTR_LEN(str), &idx)) {

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.

Ditto

@Girgias
Girgias merged commit 81f928f into php:master Nov 20, 2026
17 of 18 checks passed
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