Skip to content

Commit a73aa54

Browse files
committed
Minor fixups to S_trie_bitmap_set_folded()
This is a new static function which replaces a similar macro. Yves pointed out that 'uvc' wasn't a good name for a variable which isn't of type UV, and Hugo pointed out that a (U8) cast was redundant.
1 parent 589e2b8 commit a73aa54

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

regcomp_trie.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -523,18 +523,18 @@ is the recommended Unicode-aware way of saying
523523

524524
STATIC void
525525
S_trie_bitmap_set_folded(pTHX_ RExC_state_t *pRExC_state,
526-
reg_trie_data *trie, U8 uvc, const U8 * folder)
526+
reg_trie_data *trie, U8 ch, const U8 * folder)
527527
{
528-
TRIE_BITMAP_SET(trie, uvc);
528+
TRIE_BITMAP_SET(trie, ch);
529529
/* store the folded codepoint */
530530
if ( folder )
531-
TRIE_BITMAP_SET(trie, folder[(U8) uvc ]);
531+
TRIE_BITMAP_SET(trie, folder[ch]);
532532

533533
if ( !UTF ) {
534534
/* store first byte of utf8 representation of */
535535
/* variant codepoints */
536-
if (! UVCHR_IS_INVARIANT(uvc)) {
537-
U8 hi = UTF8_TWO_BYTE_HI(uvc);
536+
if (! UVCHR_IS_INVARIANT(ch)) {
537+
U8 hi = UTF8_TWO_BYTE_HI(ch);
538538
/* Note that hi will be either 0xc2 or 0xc3, and
539539
* TRIE_BITMAP_SET() will do >>3 to get the byte offset
540540
* within the bit table, which is constant, and Coverity

0 commit comments

Comments
 (0)