]> granicus.if.org Git - vim/commitdiff
patch 8.1.1991: still cannot build with eval but without cscope v8.1.1991
authorBram Moolenaar <Bram@vim.org>
Thu, 5 Sep 2019 21:04:02 +0000 (23:04 +0200)
committerBram Moolenaar <Bram@vim.org>
Thu, 5 Sep 2019 21:04:02 +0000 (23:04 +0200)
Problem:    Still cannot build with eval but without cscope.
Solution:   Move f_cscope_connection() outside of #ifdef.

src/if_cscope.c
src/version.c

index 4f359ee55c09d10f3f8e979911418b83b746d3fa..aac6133648249a941129a7d05dfbd0e768b0ae19 100644 (file)
@@ -432,33 +432,6 @@ cs_connection(int num, char_u *dbpath, char_u *ppath)
     return FALSE;
 }
 
-/*
- * "cscope_connection([{num} , {dbpath} [, {prepend}]])" function
- *
- * Checks the existence of a cscope connection.
- */
-    void
-f_cscope_connection(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
-{
-#ifdef FEAT_CSCOPE
-    int                num = 0;
-    char_u     *dbpath = NULL;
-    char_u     *prepend = NULL;
-    char_u     buf[NUMBUFLEN];
-
-    if (argvars[0].v_type != VAR_UNKNOWN
-           && argvars[1].v_type != VAR_UNKNOWN)
-    {
-       num = (int)tv_get_number(&argvars[0]);
-       dbpath = tv_get_string(&argvars[1]);
-       if (argvars[2].v_type != VAR_UNKNOWN)
-           prepend = tv_get_string_buf(&argvars[2], buf);
-    }
-
-    rettv->vval.v_number = cs_connection(num, dbpath, prepend);
-#endif
-}
-
 #endif
 
 
@@ -2527,4 +2500,33 @@ cs_end(void)
 
 #endif /* FEAT_CSCOPE */
 
-/* the end */
+#if defined(FEAT_EVAL) || defined(PROTO)
+
+/*
+ * "cscope_connection([{num} , {dbpath} [, {prepend}]])" function
+ *
+ * Checks the existence of a cscope connection.
+ */
+    void
+f_cscope_connection(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
+{
+# ifdef FEAT_CSCOPE
+    int                num = 0;
+    char_u     *dbpath = NULL;
+    char_u     *prepend = NULL;
+    char_u     buf[NUMBUFLEN];
+
+    if (argvars[0].v_type != VAR_UNKNOWN
+           && argvars[1].v_type != VAR_UNKNOWN)
+    {
+       num = (int)tv_get_number(&argvars[0]);
+       dbpath = tv_get_string(&argvars[1]);
+       if (argvars[2].v_type != VAR_UNKNOWN)
+           prepend = tv_get_string_buf(&argvars[2], buf);
+    }
+
+    rettv->vval.v_number = cs_connection(num, dbpath, prepend);
+# endif
+}
+
+#endif // FEAT_EVAL
index e7fd1cf649b3d07ef0ec3122ad79fa4633e5b9b5..4d280332856385e64a00076b714252883b95c508 100644 (file)
@@ -757,6 +757,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1991,
 /**/
     1990,
 /**/