diff options
author | Karl Williamson <khw@cpan.org> | 2021-06-05 08:57:37 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2021-07-30 05:41:28 -0600 |
commit | 58ddb8c5c1121d947ee72818b81ee254edb17699 (patch) | |
tree | fae616d14a764f6b066abc78d41a73cbb7467036 /inline.h | |
parent | 8a6ab0a2b6184deb2f9a99f0a9622e8f836de4bd (diff) | |
download | perl-58ddb8c5c1121d947ee72818b81ee254edb17699.tar.gz |
Perl_variant_byte_number: Move assert()
This should be called only when it is known there is a variant byte.
The assert() previously wasn't checking that precisely
Diffstat (limited to 'inline.h')
-rw-r--r-- | inline.h | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -712,11 +712,13 @@ Perl_variant_byte_number(PERL_UINTMAX_T word) /* This returns the position in a word (0..7) of the first variant byte in * it. This is a helper function. Note that there are no branches */ - assert(word); - /* Get just the msb bits of each byte */ word &= PERL_VARIANTS_WORD_MASK; + /* This should only be called if we know there is a variant byte in the + * word */ + assert(word); + # if BYTEORDER == 0x1234 || BYTEORDER == 0x12345678 /* Bytes are stored like |