Skip to content

Commit 315ed16

Browse files
authored
gh-157695: Rename HAVE_ICONV to _Py_HAVE_ICONV (#157821)
Update check_capi_macros_ignored.txt.
1 parent d5dede7 commit 315ed16

8 files changed

Lines changed: 18 additions & 19 deletions

File tree

‎Include/internal/pycore_unicodeobject.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ extern int _PyUnicodeWriter_FormatV(
244244

245245
/* --- iconv Codec -------------------------------------------------------- */
246246

247-
#ifdef HAVE_ICONV
247+
#ifdef _Py_HAVE_ICONV
248248
extern PyObject* _PyUnicode_DecodeIconv(
249249
const char *encoding, /* iconv encoding name */
250250
const char *string, /* encoded string */

‎Modules/_codecsmodule.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,7 @@ _codecs_code_page_decode_impl(PyObject *module, int codepage,
642642

643643
#endif /* MS_WINDOWS */
644644

645-
#ifdef HAVE_ICONV
645+
#ifdef _Py_HAVE_ICONV
646646

647647
/*[clinic input]
648648
_codecs.iconv_decode
@@ -665,7 +665,7 @@ _codecs_iconv_decode_impl(PyObject *module, const char *encoding,
665665
return codec_tuple(decoded, consumed);
666666
}
667667

668-
#endif /* HAVE_ICONV */
668+
#endif /* _Py_HAVE_ICONV */
669669

670670
/* --- Encoder ------------------------------------------------------------ */
671671

@@ -977,7 +977,7 @@ _codecs_code_page_encode_impl(PyObject *module, int code_page, PyObject *str,
977977

978978
#endif /* MS_WINDOWS */
979979

980-
#ifdef HAVE_ICONV
980+
#ifdef _Py_HAVE_ICONV
981981

982982
/*[clinic input]
983983
_codecs.iconv_encode
@@ -996,7 +996,7 @@ _codecs_iconv_encode_impl(PyObject *module, const char *encoding,
996996
PyUnicode_GET_LENGTH(str));
997997
}
998998

999-
#endif /* HAVE_ICONV */
999+
#endif /* _Py_HAVE_ICONV */
10001000

10011001
/* --- Error handler registry --------------------------------------------- */
10021002

‎Modules/clinic/_codecsmodule.c.h‎

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Objects/unicodeobject.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
6767
#include <windows.h>
6868
#endif
6969

70-
#ifdef HAVE_ICONV
70+
#ifdef _Py_HAVE_ICONV
7171
#include <iconv.h> // iconv_open()
7272
#endif
7373

@@ -8220,7 +8220,7 @@ PyUnicode_AsMBCSString(PyObject *unicode)
82208220

82218221
/* --- iconv Codec -------------------------------------------------------- */
82228222

8223-
#ifdef HAVE_ICONV
8223+
#ifdef _Py_HAVE_ICONV
82248224

82258225
/* iconv pivot: native-endian UTF-32, a raw array of Py_UCS4. One input unit is
82268226
one code point, so error handlers get the exact position. A platform whose
@@ -8602,7 +8602,7 @@ _PyUnicode_EncodeIconv(const char *encoding, PyObject *unicode,
86028602
return result;
86038603
}
86048604

8605-
#endif /* HAVE_ICONV */
8605+
#endif /* _Py_HAVE_ICONV */
86068606

86078607
/* --- Character Mapping Codec -------------------------------------------- */
86088608

‎Tools/build/check_capi_macros_ignored.txt‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,6 @@ HAVE_GRANTPT
298298
HAVE_GRP_H
299299
HAVE_HSTRERROR
300300
HAVE_HTOLE64
301-
HAVE_ICONV
302301
HAVE_ICONV_H
303302
HAVE_IF_INDEXTONAME
304303
HAVE_IF_NAMEINDEX

‎configure‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎configure.ac‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3986,7 +3986,7 @@ if test "$py_have_iconv" = yes; then
39863986
])
39873987
])
39883988
if test "$ac_cv_have_iconv" != no; then
3989-
AC_DEFINE([HAVE_ICONV], [1],
3989+
AC_DEFINE([_Py_HAVE_ICONV], [1],
39903990
[Define if you have a working iconv() function.])
39913991
if test "$ac_cv_have_iconv" = -liconv; then
39923992
LIBS="-liconv $LIBS"

‎pyconfig.h.in‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -742,9 +742,6 @@
742742
/* Define this if you have le64toh() */
743743
#undef HAVE_HTOLE64
744744

745-
/* Define if you have a working iconv() function. */
746-
#undef HAVE_ICONV
747-
748745
/* Define to 1 if you have the <iconv.h> header file. */
749746
#undef HAVE_ICONV_H
750747

@@ -2210,6 +2207,9 @@
22102207
/* Defined if _Float16 C type is supported */
22112208
#undef _Py_HAVE_FLOAT16
22122209

2210+
/* Define if you have a working iconv() function. */
2211+
#undef _Py_HAVE_ICONV
2212+
22132213
/* Define to 1 if libgcc __register_frame and __deregister_frame are linkable.
22142214
*/
22152215
#undef _Py_HAVE_LIBGCC_EH_FRAME_REGISTRATION

0 commit comments

Comments
 (0)