]> granicus.if.org Git - vim/commitdiff
patch 9.0.1102: complicated use of #ifdef v9.0.1102
authorK.Takata <kentkt@csc.jp>
Mon, 26 Dec 2022 14:46:51 +0000 (14:46 +0000)
committerBram Moolenaar <Bram@vim.org>
Mon, 26 Dec 2022 14:46:51 +0000 (14:46 +0000)
Problem:    Complicated use of #ifdef.
Solution:   Simplify #ifdef use. (Ken Takata, closes #11745)

src/if_python3.c
src/version.c

index e0c546a3f7db65a4a34648fa29c1fac24a0970dc..30332e1662d4843ee2c0e0008eeac0f17abc49cd 100644 (file)
@@ -1167,14 +1167,10 @@ Python3_Init(void)
        // Catch exit() called in Py_Initialize().
        hook_py_exit();
        if (setjmp(exit_hook_jump_buf) == 0)
-#endif
        {
            Py_Initialize();
-#ifdef HOOK_EXIT
            restore_py_exit();
-#endif
        }
-#ifdef HOOK_EXIT
        else
        {
            // exit() was called in Py_Initialize().
@@ -1182,6 +1178,8 @@ Python3_Init(void)
            emsg(_(e_critical_error_in_python3_initialization_check_your_installation));
            goto fail;
        }
+#else
+       Py_Initialize();
 #endif
 
 #if PY_VERSION_HEX < 0x03090000
index d379aa9988681fff4a27830597a3330b620066af..429d9ce684e039d4828dcb3a73697925379cc462 100644 (file)
@@ -695,6 +695,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1102,
 /**/
     1101,
 /**/