diff options
author | Karl Williamson <khw@cpan.org> | 2021-06-25 11:49:51 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2021-08-07 05:14:43 -0600 |
commit | 787e83840f698af38f64833c284e0e30865698c0 (patch) | |
tree | fc905253105029d04bcdf8ee3c21b8ccf76258bb /inline.h | |
parent | 7bf011a13027d25777e5d934629cb489812d20c9 (diff) | |
download | perl-787e83840f698af38f64833c284e0e30865698c0.tar.gz |
Reimplement OFFUNISKIP
Now that previous commits have made it fast to find the position of the
first set bit in a word, we can use a forumla to find how many bytes the
UTF-8 of that will occupy. This allows for simplification of this
macro, removing several conditionals
Diffstat (limited to 'inline.h')
-rw-r--r-- | inline.h | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -939,6 +939,14 @@ Perl_msbit_pos32(U32 word) } +#if UVSIZE == U64SIZE +# define msbit_pos(word) msbit_pos64(word) +# define lsbit_pos(word) lsbit_pos64(word) +#elif UVSIZE == U32SIZE +# define msbit_pos(word) msbit_pos32(word) +# define lsbit_pos(word) lsbit_pos32(word) +#endif + #ifdef U64TYPE /* HAS_QUAD not usable outside the core */ PERL_STATIC_INLINE unsigned |