]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.1673: if_python: still support for Python 1 v9.1.1673
authorHirohito Higashi <h.east.727@gmail.com>
Sat, 23 Aug 2025 14:31:15 +0000 (16:31 +0200)
committerChristian Brabandt <cb@256bit.org>
Sat, 23 Aug 2025 14:31:15 +0000 (16:31 +0200)
Problem:  if_python: still support for Python 1
Solution: Drop outdated code (Hirohito Higashi)

closes: #18092

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/if_python.c
src/version.c

index 43b780be75bd963b528b2ab8c02014c836f24392..6ba0f90fa50149eb68472e9dcb5907d6011024cd 100644 (file)
@@ -838,10 +838,6 @@ static int PythonMod_Init(void);
 ///////////////////////////////////////////////////////
 // 1. Python interpreter main program.
 
-#if PYTHON_API_VERSION < 1007 // Python 1.4
-typedef PyObject PyThreadState;
-#endif
-
 #ifndef PY_CAN_RECURSE
 static PyThreadState *saved_python_thread = NULL;
 
@@ -1561,17 +1557,6 @@ do_pyeval(char_u *str, dict_T *locals, typval_T *rettv)
     }
 }
 
-// Don't generate a prototype for the next function, it generates an error on
-// newer Python versions.
-#if PYTHON_API_VERSION < 1007 /* Python 1.4 */ && !defined(PROTO)
-
-    char *
-Py_GetProgramName(void)
-{
-    return "vim";
-}
-#endif // Python 1.4
-
     int
 set_ref_in_python(int copyID)
 {
index 718c415006a9ad80d4f7ebc6fabc097f03e4bf4a..3a664bfb28d9867ddb8b9cbeb173910a01297c1b 100644 (file)
@@ -724,6 +724,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1673,
 /**/
     1672,
 /**/