In perl.git, the branch maint-5.26 has been updated <http://perl5.git.perl.org/perl.git/commitdiff/d3464098a649fdfba7180a72cdda01beb6003867?hp=71952815d7bf35e0fdc12571d0edbcd32ce77e04>
- Log ----------------------------------------------------------------- commit d3464098a649fdfba7180a72cdda01beb6003867 Author: Karl Williamson <k...@cpan.org> Date: Thu Jun 1 10:44:08 2017 -0600 utf8.h: Add parens around macro param in expansion a6951642ede4abe605dcf0e94b74948e0a60a56b added an assertion to find bugs in calling macros, and so far, instead, it found a bug in a macro. A parameter needs to be enclosed in parens in case it is an expression, so that precedence works. (cherry picked from commit 4e1ed312da261450ba45a56e7b6756a873678f52) ----------------------------------------------------------------------- Summary of changes: utf8.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/utf8.h b/utf8.h index affa2d67f5..59e8972822 100644 --- a/utf8.h +++ b/utf8.h @@ -534,9 +534,10 @@ encoded as UTF-8. C<cp> is a native (ASCII or EBCDIC) code point if less than & UTF_CONTINUATION_MASK)) /* This works in the face of malformed UTF-8. */ -#define UTF8_IS_NEXT_CHAR_DOWNGRADEABLE(s, e) (UTF8_IS_DOWNGRADEABLE_START(*s) \ - && ( (e) - (s) > 1) \ - && UTF8_IS_CONTINUATION(*((s)+1))) +#define UTF8_IS_NEXT_CHAR_DOWNGRADEABLE(s, e) \ + ( UTF8_IS_DOWNGRADEABLE_START(*(s)) \ + && ( (e) - (s) > 1) \ + && UTF8_IS_CONTINUATION(*((s)+1))) /* Number of bytes a code point occupies in UTF-8. */ #define NATIVE_SKIP(uv) UVCHR_SKIP(uv) -- Perl5 Master Repository