Skip to content

ext/phar: refactor phar_split_fname() to return zend_string* rather than out params#21777

Open
Girgias wants to merge 2 commits intophp:masterfrom
Girgias:2026-04-phar-refactor-2
Open

ext/phar: refactor phar_split_fname() to return zend_string* rather than out params#21777
Girgias wants to merge 2 commits intophp:masterfrom
Girgias:2026-04-phar-refactor-2

Conversation

@Girgias
Copy link
Copy Markdown
Member

@Girgias Girgias commented Apr 16, 2026

No description provided.

@Girgias Girgias force-pushed the 2026-04-phar-refactor-2 branch from a26127c to 3523fc1 Compare April 16, 2026 23:16
@Girgias Girgias marked this pull request as ready for review April 17, 2026 00:04
Copy link
Copy Markdown
Member

@iluuu1994 iluuu1994 left a comment

Choose a reason for hiding this comment

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

Couldn't see any obvious mistakes.

Comment thread ext/phar/phar.c
* This is used by phar_parse_url()
*/
zend_result phar_split_fname(const char *filename, size_t filename_len, char **arch, size_t *arch_len, zend_string **entry, int executable, int for_create) /* {{{ */
zend_string* phar_split_fname_ex(const char *filename, size_t filename_len, zend_string **entry, int executable, int for_create, const char **error) /* {{{ */
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.

Nit: zend_string* pointer-style is much less common in the codebase (7k without space, 106k with space according to ripgrep, including some false positives for multiplication). I don't particularly care about which style is used but switching now is probably not useful.

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