Skip to content

ext/intl: Separate UConverter object lifecycle from method implementations - #24216

Merged
LamentXU123 merged 2 commits into
php:masterfrom
LamentXU123:intl-ref-20261009
Oct 10, 2026
Merged

LamentXU123 merged 2 commits into
php:masterfrom
LamentXU123:intl-ref-20261009

Conversation

@LamentXU123

Copy link
Copy Markdown
Member

As a good convention of collator, formatter, transliterator, etc, etc. We seperate class stuff into *_class.cpp. The converter.cpp file is now almost 1k line which is hard to maintain.

@devnexen

Copy link
Copy Markdown
Member

that will possibly complicate the merge up later on I feel

Comment thread ext/intl/converter/converter_class.cpp Outdated
@LamentXU123

Copy link
Copy Markdown
Member Author

that will possibly complicate the merge up later on I feel

I was aware. There has been refactorings which is bad to merging up as far as I see (like the zend_string* ones 0d440d3) so I thought sacrifising the convinence when merging up for refactorings is acceptable generally ?

Comment thread ext/intl/converter/converter_class.h Outdated
} php_converter_object;

static inline php_converter_object *php_converter_fetch_object(zend_object *obj) {
return (php_converter_object *)((char*)(obj) - offsetof(php_converter_object, obj));

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.

while at it, let s use ZEND_CONTAINER_OF then like other classes do already it seems.

@LamentXU123
LamentXU123 merged commit 749de79 into php:master Oct 10, 2026
17 of 18 checks passed
@LamentXU123

Copy link
Copy Markdown
Member Author

Thanks!

@LamentXU123
LamentXU123 deleted the intl-ref-20261009 branch October 10, 2026 07:59
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