diff options
author | Karl Williamson <khw@cpan.org> | 2019-10-31 18:59:17 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2019-10-31 19:06:02 -0600 |
commit | e7ae132ec78c3f5a7900ab316e2ab908311fb946 (patch) | |
tree | 93e1db17856ea8531bdfa98bbfe0ccf3ea8d1dde /utf8.h | |
parent | b16dfd16370837c4a8d092c9f5bbb58a2dde7fe7 (diff) | |
download | perl-e7ae132ec78c3f5a7900ab316e2ab908311fb946.tar.gz |
Consolidate uses of PERL_SMALL_MACRO_BUFFER
At the moment the _ASSERT_() is the one which has been showing large
expansions. Change so it doesn't do anything if PERL_SMALL_MACRO_BUFFER
is defined. That means various other calls that use
PERL_SMALL_MACRO_BUFFER can be simplified to not use it.
Diffstat (limited to 'utf8.h')
-rw-r--r-- | utf8.h | 19 |
1 files changed, 2 insertions, 17 deletions
@@ -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)) |