Skip to content

Commit 04a3e58

Browse files
committed
Change definions in 'reiconv.hpp' to constexpr.
修改: ChangeLog 修改: include/cppp/reiconv.hpp.in
1 parent af630fd commit 04a3e58

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

ChangeLog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
Move generated file into 'lib/generated'.
1313
Move cppp-reiconv to a C++ library.
1414
Remove translit support.
15+
Remove 'LIBICONV_PLUG'.
1516

1617
2023-06-29 Bruno Haible <bruno@clisp.org>
1718

include/cppp/reiconv.hpp.in

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -136,22 +136,22 @@ extern "C++"
136136

137137
/* Surfaces.
138138
The concept of surfaces is described in the 'recode' manual. */
139-
#define ICONV_SURFACE_NONE 0
139+
constexpr int ICONV_SURFACE_NONE = 0;
140140
/* In EBCDIC encodings, 0x15 (which encodes the "newline function", see the
141141
Unicode standard, chapter 5) maps to U+000A instead of U+0085. This is
142142
for interoperability with C programs and Unix environments on z/OS. */
143-
#define ICONV_SURFACE_EBCDIC_ZOS_UNIX 1
143+
constexpr int ICONV_SURFACE_EBCDIC_ZOS_UNIX = 1;////////////
144144

145145
/* Requests for iconvctl. */
146-
#define ICONV_TRIVIALP 0 /* int *argument */
147-
#define ICONV_GET_DISCARD_ILSEQ 3 /* int *argument */
148-
#define ICONV_SET_DISCARD_ILSEQ 4 /* const int *argument */
149-
#define ICONV_SET_HOOKS 5 /* const struct iconv_hooks *argument */
150-
#define ICONV_SET_FALLBACKS 6 /* const struct iconv_fallbacks *argument */
151-
#define ICONV_GET_FROM_SURFACE 7 /* unsigned int *argument */
152-
#define ICONV_SET_FROM_SURFACE 8 /* const unsigned int *argument */
153-
#define ICONV_GET_TO_SURFACE 9 /* unsigned int *argument */
154-
#define ICONV_SET_TO_SURFACE 10 /* const unsigned int *argument */
146+
constexpr int ICONV_TRIVIALP = 0; /* int *argument */
147+
constexpr int ICONV_GET_DISCARD_ILSEQ = 3; /* int *argument */
148+
constexpr int ICONV_SET_DISCARD_ILSEQ = 4; /* const int *argument */
149+
constexpr int ICONV_SET_HOOKS = 5; /* const struct iconv_hooks *argument */
150+
constexpr int ICONV_SET_FALLBACKS = 6; /* const struct iconv_fallbacks *argument */
151+
constexpr int ICONV_GET_FROM_SURFACE = 7; /* unsigned int *argument */
152+
constexpr int ICONV_SET_FROM_SURFACE = 8; /* const unsigned int *argument */
153+
constexpr int ICONV_GET_TO_SURFACE = 9; /* unsigned int *argument */
154+
constexpr int ICONV_SET_TO_SURFACE = 10; /* const unsigned int *argument */
155155

156156
/* Listing of locale independent encodings. */
157157
extern @DLL_VARIABLE@ void iconvlist (int (*do_one) (unsigned int namescount,

0 commit comments

Comments
 (0)