Skip to content

Conversation

khwilliamson
Copy link
Contributor

@khwilliamson khwilliamson commented Oct 2, 2025

This changes:
To use mnemonic macros instead of sizeof()
To declare the correct return type from strlen()
To change the confusing names of a static function and formal parameter
To change a a static function parameter that is boolean-valued to bool, not I32
To change two static functions parameters to point to string-end, not length, simplifying some expressions.
To change a complicated for loop that dealt with non-existent UTF-8ness to a simpler while
To change some other for loops to simpler while or do while ones.

  • This set of changes does not require a perldelta entry.

Change it from being an array length, to being a pointer to the ending
position of the array.  This makes this function consistent with most of
the others in this file.

It allows us to usually use C_ARRAY_END() to wrap the parameter, which
simplifies some expressions,
Change it from being an array length, to being a pointer to the ending
position of the array.  This makes this function consistent with most of
the others in this file.

It allows us to usually use C_ARRAY_END() to wrap the parameter, which
simplifies some expressions,
The length of a constant literal is STRLENs
The end position of a C array is C_ARRAY_END
The number of elements in a C array is C_ARRAY_LENGTH
'uni' commonly is short for Unicode.  Here, it was short for 'unary',
which I found highly confusing.

This also changes the name of a formal parameter to also not be 'uni'
when 'unary' is meant.
All calls to it set it to TRUE or FALSE
isSPACE only matches single-byte characters; no need to be concerned
with UTF-8ness
By using the output of the first macro, and skipping ahead in the parse
string, we avoid reparsing the same bytes.
@khwilliamson khwilliamson merged commit 656be9b into Perl:blead Oct 7, 2025
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants