]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-120713: Make _Py_NORMALIZE_CENTURY private (GH-135933)
authorPetr Viktorin <encukou@gmail.com>
Mon, 7 Jul 2025 15:57:48 +0000 (17:57 +0200)
committerGitHub <noreply@github.com>
Mon, 7 Jul 2025 15:57:48 +0000 (17:57 +0200)
Modules/_datetimemodule.c
configure
configure.ac
pyconfig.h.in

index eb90be81c8d34c20c89b7a361e01caac073d22a3..7a6426593d021fb941e57c5eca15cba48d73374c 100644 (file)
@@ -1934,7 +1934,7 @@ wrap_strftime(PyObject *object, PyObject *format, PyObject *timetuple,
             }
             replacement = freplacement;
         }
-#ifdef Py_NORMALIZE_CENTURY
+#ifdef _Py_NORMALIZE_CENTURY
         else if (ch == 'Y' || ch == 'G'
                  || ch == 'F' || ch == 'C'
         ) {
index 9df366697b8546aab8f2fe1a6ae7f074e9440a4e..4a0f8959c8727d5acd84da6a3a7840136ca85639 100755 (executable)
--- a/configure
+++ b/configure
@@ -28218,7 +28218,7 @@ printf "%s\n" "$ac_cv_normalize_century" >&6; }
 if test "$ac_cv_normalize_century" = yes
 then
 
-printf "%s\n" "#define Py_NORMALIZE_CENTURY 1" >>confdefs.h
+printf "%s\n" "#define _Py_NORMALIZE_CENTURY 1" >>confdefs.h
 
 fi
 
index cb7f2144345b3721a3f791582ee862989082ab4f..10d7a0c60561075c683bb0a2658a3361d4f75f8e 100644 (file)
@@ -6803,7 +6803,7 @@ int main(void)
 [ac_cv_normalize_century=yes])])
 if test "$ac_cv_normalize_century" = yes
 then
-  AC_DEFINE([Py_NORMALIZE_CENTURY], [1],
+  AC_DEFINE([_Py_NORMALIZE_CENTURY], [1],
   [Define if year with century should be normalized for strftime.])
 fi
 
index d7c496fccc682cd8d5952948d16acdef929f14af..1c533b2bfb7fb4d4bad396ba74b9e08f158b8b1d 100644 (file)
    SipHash13: 3, externally defined: 0 */
 #undef Py_HASH_ALGORITHM
 
-/* Define if year with century should be normalized for strftime. */
-#undef Py_NORMALIZE_CENTURY
-
 /* Define if you want to enable remote debugging support. */
 #undef Py_REMOTE_DEBUG
 
 /* HACL* library can compile SIMD256 implementations */
 #undef _Py_HACL_CAN_COMPILE_VEC256
 
+/* Define if year with century should be normalized for strftime. */
+#undef _Py_NORMALIZE_CENTURY
+
 /* Define to force use of thread-safe errno, h_errno, and other functions */
 #undef _REENTRANT