develooper Front page | perl.perl5.changes | Postings from October 2019

[perl.git] branch smoke-me/khw-expand updated.v5.31.4-319-gc9cc71b363

From:
Karl Williamson
Date:
October 10, 2019 13:08
Subject:
[perl.git] branch smoke-me/khw-expand updated.v5.31.4-319-gc9cc71b363
Message ID:
E1iIYAd-0002CT-EC@git.dc.perl.space
In perl.git, the branch smoke-me/khw-expand has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/c9cc71b363459c139108c212d9f61059343380d7?hp=85f1d6b46f5b9017f188b1ed51401fc3fc4b41db>

- Log -----------------------------------------------------------------
commit c9cc71b363459c139108c212d9f61059343380d7
Author: Karl Williamson <khw@cpan.org>
Date:   Thu Oct 10 07:07:47 2019 -0600

    smoke

-----------------------------------------------------------------------

Summary of changes:
 handy.h |  3 ++-
 perl.h  |  5 +++++
 utf8.h  | 19 ++-----------------
 3 files changed, 9 insertions(+), 18 deletions(-)

diff --git a/handy.h b/handy.h
index 180aeca306..f87a52840e 100644
--- a/handy.h
+++ b/handy.h
@@ -284,7 +284,8 @@ We also use empty definition under Coverity since the __ASSERT__
 checks often check for things that Really Cannot Happen, and Coverity
 detects that and gets all excited. */
 
-#if defined(DEBUGGING) && !defined(__COVERITY__)
+#if   defined(DEBUGGING) && !defined(__COVERITY__)                        \
+ && ! defined(PERL_SMALL_MACRO_BUFFER)
 #   define __ASSERT_(statement)  assert(statement),
 #else
 #   define __ASSERT_(statement)
diff --git a/perl.h b/perl.h
index 05dbe0e785..ac8aa515dd 100644
--- a/perl.h
+++ b/perl.h
@@ -395,6 +395,11 @@
 #  endif
 #endif
 
+#if defined(_MSC_VER)
+/* XXX older MSVC versions have a smallish macro buffer */
+#define PERL_SMALL_MACRO_BUFFER
+#endif
+
 /* on gcc (and clang), specify that a warning should be temporarily
  * ignored; e.g.
  *
diff --git a/utf8.h b/utf8.h
index 83cccf16c3..0839fdfa97 100644
--- a/utf8.h
+++ b/utf8.h
@@ -144,11 +144,6 @@ EXTCONST unsigned char PL_utf8skip[];
 
 END_EXTERN_C
 
-#if defined(_MSC_VER) && _MSC_VER < 1400
-/* older MSVC versions have a smallish macro buffer */
-#define PERL_SMALL_MACRO_BUFFER
-#endif
-
 /*
 
 =for apidoc Am|U8|NATIVE_TO_LATIN1|U8 ch
@@ -194,13 +189,8 @@ adding no time nor space requirements to the implementation.
 =cut
 */
 
-#ifdef PERL_SMALL_MACRO_BUFFER
-#  define NATIVE_TO_LATIN1(ch)     ((U8)(ch))
-#  define LATIN1_TO_NATIVE(ch)     ((U8)(ch))
-#else
-#  define NATIVE_TO_LATIN1(ch)     (__ASSERT_(FITS_IN_8_BITS(ch)) ((U8) ((ch) | 0)))
-#  define LATIN1_TO_NATIVE(ch)     (__ASSERT_(FITS_IN_8_BITS(ch)) ((U8) ((ch) | 0)))
-#endif
+#define NATIVE_TO_LATIN1(ch)     (__ASSERT_(FITS_IN_8_BITS(ch)) ((U8) ((ch) | 0)))
+#define LATIN1_TO_NATIVE(ch)     (__ASSERT_(FITS_IN_8_BITS(ch)) ((U8) ((ch) | 0)))
 
 /* I8 is an intermediate version of UTF-8 used only in UTF-EBCDIC.  We thus
  * consider it to be identical to UTF-8 on ASCII platforms.  Strictly speaking
@@ -208,13 +198,8 @@ adding no time nor space requirements to the implementation.
  * because they are 8-bit encodings that serve the same purpose in Perl, and
  * rarely do we need to distinguish them.  The term "NATIVE_UTF8" applies to
  * whichever one is applicable on the current platform */
-#ifdef PERL_SMALL_MACRO_BUFFER
-#define NATIVE_UTF8_TO_I8(ch) ((U8) (ch))
-#define I8_TO_NATIVE_UTF8(ch) ((U8) (ch))
-#else
 #define NATIVE_UTF8_TO_I8(ch) (__ASSERT_(FITS_IN_8_BITS(ch)) ((U8) ((ch) | 0)))
 #define I8_TO_NATIVE_UTF8(ch) (__ASSERT_(FITS_IN_8_BITS(ch)) ((U8) ((ch) | 0)))
-#endif
 
 #define UNI_TO_NATIVE(ch)        ((UV) ((ch) | 0))
 #define NATIVE_TO_UNI(ch)        ((UV) ((ch) | 0))

-- 
Perl5 Master Repository



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About