]> granicus.if.org Git - vim/commitdiff
updated for version 7.2-045 v7.2.045
authorBram Moolenaar <Bram@vim.org>
Thu, 20 Nov 2008 10:04:53 +0000 (10:04 +0000)
committerBram Moolenaar <Bram@vim.org>
Thu, 20 Nov 2008 10:04:53 +0000 (10:04 +0000)
src/if_python.c
src/version.c

index baf505c594eb19e22e3febacc4189c81e40d09d6..4a148840b95b7da2f158497251b558261a19c02b 100644 (file)
@@ -531,6 +531,12 @@ Python_Init(void)
        if (PythonMod_Init())
            goto fail;
 
+       /* Remove the element from sys.path that was added because of our
+        * argv[0] value in PythonMod_Init().  Previously we used an empty
+        * string, but dependinding on the OS we then get an empty entry or
+        * the current directory in sys.path. */
+       PyRun_SimpleString("import sys; sys.path = filter(lambda x: x != '/must>not&exist', sys.path)");
+
        /* the first python thread is vim's, release the lock */
        Python_SaveThread();
 
@@ -2345,7 +2351,8 @@ PythonMod_Init(void)
 {
     PyObject *mod;
     PyObject *dict;
-    static char *(argv[2]) = {"", NULL};
+    /* The special value is removed from sys.path in Python_Init(). */
+    static char *(argv[2]) = {"/must>not&exist/foo", NULL};
 
     /* Fixups... */
     BufferType.ob_type = &PyType_Type;
index a3901f4c965d61b14eda108a5d04cb09f21a1770..3529bb084674216cecc9ae36288d9a906f5fc359 100644 (file)
@@ -676,6 +676,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    45,
 /**/
     44,
 /**/