Commits

Anonymous committed 36fd800

updated for version 7.3.819
Problem: Compiling without +eval and with Python isn't working.
Solution: Add the eval feature when building with Python.

Comments (0)

Files changed (7)

     hash_clear(&compat_hashtab);
 
     free_scriptnames();
+# if defined(FEAT_CMDL_COMPL)
     free_locales();
+# endif
 
     /* global variables */
     vars_clear(&globvarht);
 }
 
 
-#if (defined(FEAT_USR_CMDS) && defined(FEAT_CMDL_COMPL)) \
-	|| defined(FEAT_COMPL_FUNC) || defined(PROTO)
 /*
  * Call some vimL function and return the result in "*rettv".
  * Uses argv[argc] for the function arguments.  Only Number and String
     return ret;
 }
 
+/*
+ * Call vimL function "func" and return the result as a number.
+ * Returns -1 when calling the function fails.
+ * Uses argv[argc] for the function arguments.
+ */
+    long
+call_func_retnr(func, argc, argv, safe)
+    char_u      *func;
+    int		argc;
+    char_u      **argv;
+    int		safe;		/* use the sandbox */
+{
+    typval_T	rettv;
+    long	retval;
+
+    /* All arguments are passed as strings, no conversion to number. */
+    if (call_vim_function(func, argc, argv, safe, TRUE, &rettv) == FAIL)
+	return -1;
+
+    retval = get_tv_number_chk(&rettv, NULL);
+    clear_tv(&rettv);
+    return retval;
+}
+
+#if (defined(FEAT_USR_CMDS) && defined(FEAT_CMDL_COMPL)) \
+	|| defined(FEAT_COMPL_FUNC) || defined(PROTO)
+
 # if (defined(FEAT_USR_CMDS) && defined(FEAT_CMDL_COMPL)) || defined(PROTO)
 /*
  * Call vimL function "func" and return the result as a string.
 }
 # endif
 
-# if defined(FEAT_COMPL_FUNC) || defined(PROTO)
-/*
- * Call vimL function "func" and return the result as a number.
- * Returns -1 when calling the function fails.
- * Uses argv[argc] for the function arguments.
- */
-    long
-call_func_retnr(func, argc, argv, safe)
-    char_u      *func;
-    int		argc;
-    char_u      **argv;
-    int		safe;		/* use the sandbox */
-{
-    typval_T	rettv;
-    long	retval;
-
-    /* All arguments are passed as strings, no conversion to number. */
-    if (call_vim_function(func, argc, argv, safe, TRUE, &rettv) == FAIL)
-	return -1;
-
-    retval = get_tv_number_chk(&rettv, NULL);
-    clear_tv(&rettv);
-    return retval;
-}
-# endif
-
 /*
  * Call vimL function "func" and return the result as a List.
  * Uses argv[argc] for the function arguments.
 }
 #endif
 
-
 /*
  * Save the current function call pointer, and set it to NULL.
  * Used when executing autocommands and for ":source".
  */
     static void
 f_cindent(argvars, rettv)
-    typval_T	*argvars;
+    typval_T	*argvars UNUSED;
     typval_T	*rettv;
 {
 #ifdef FEAT_CINDENT
 
     static void
 findfilendir(argvars, rettv, find_what)
-    typval_T	*argvars;
-    typval_T	*rettv;
-    int		find_what;
+    typval_T	*argvars UNUSED;
+    typval_T	*rettv;
+    int		find_what UNUSED;
 {
 #ifdef FEAT_SEARCHPATH
     char_u	*fname;
  */
     static void
 foldclosed_both(argvars, rettv, end)
-    typval_T	*argvars;
-    typval_T	*rettv;
-    int		end;
+    typval_T	*argvars UNUSED;
+    typval_T	*rettv;
+    int		end UNUSED;
 {
 #ifdef FEAT_FOLDING
     linenr_T	lnum;
  */
     static void
 f_foldlevel(argvars, rettv)
-    typval_T	*argvars;
-    typval_T	*rettv;
+    typval_T	*argvars UNUSED;
+    typval_T	*rettv UNUSED;
 {
 #ifdef FEAT_FOLDING
     linenr_T	lnum;
     static void
 f_getmatches(argvars, rettv)
     typval_T	*argvars UNUSED;
-    typval_T	*rettv;
+    typval_T	*rettv UNUSED;
 {
 #ifdef FEAT_SEARCH_EXTRA
     dict_T	*dict;
  */
     static void
 f_lispindent(argvars, rettv)
-    typval_T	*argvars;
+    typval_T	*argvars UNUSED;
     typval_T	*rettv;
 {
 #ifdef FEAT_LISP
  */
     static void
 f_matchadd(argvars, rettv)
-    typval_T	*argvars;
-    typval_T	*rettv;
+    typval_T	*argvars UNUSED;
+    typval_T	*rettv UNUSED;
 {
 #ifdef FEAT_SEARCH_EXTRA
     char_u	buf[NUMBUFLEN];
  */
     static void
 f_matcharg(argvars, rettv)
-    typval_T	*argvars;
+    typval_T	*argvars UNUSED;
     typval_T	*rettv;
 {
     if (rettv_list_alloc(rettv) == OK)
  */
     static void
 f_matchdelete(argvars, rettv)
-    typval_T	*argvars;
-    typval_T	*rettv;
+    typval_T	*argvars UNUSED;
+    typval_T	*rettv UNUSED;
 {
 #ifdef FEAT_SEARCH_EXTRA
     rettv->vval.v_number = match_delete(curwin,
  */
     static void
 f_reltime(argvars, rettv)
-    typval_T	*argvars;
-    typval_T	*rettv;
+    typval_T	*argvars UNUSED;
+    typval_T	*rettv UNUSED;
 {
 #ifdef FEAT_RELTIME
     proftime_T	res;
  */
     static void
 f_reltimestr(argvars, rettv)
-    typval_T	*argvars;
+    typval_T	*argvars UNUSED;
     typval_T	*rettv;
 {
 #ifdef FEAT_RELTIME
     int		flags;	    /* SP_SETPCMARK and other SP_ values */
     pos_T	*match_pos;
     linenr_T	lnum_stop;  /* stop at this line if not zero */
-    long	time_limit; /* stop after this many msec */
+    long	time_limit UNUSED; /* stop after this many msec */
 {
     char_u	*save_cpo;
     char_u	*pat, *pat2 = NULL, *pat3 = NULL;
  */
     static void
 f_setmatches(argvars, rettv)
-    typval_T	*argvars;
-    typval_T	*rettv;
+    typval_T	*argvars UNUSED;
+    typval_T	*rettv UNUSED;
 {
 #ifdef FEAT_SEARCH_EXTRA
     list_T	*l;
  */
     static void
 f_undofile(argvars, rettv)
-    typval_T	*argvars;
+    typval_T	*argvars UNUSED;
     typval_T	*rettv;
 {
     rettv->v_type = VAR_STRING;
 #ifdef FEAT_EVAL
 	    /* avoid that a function call in 'statusline' does this */
 	    && !getline_equal(fgetline, cookie, get_func_line)
+#endif
+#ifdef FEAT_AUTOCMD
 	    /* avoid that an autocommand, e.g. QuitPre, does this */
 	    && !getline_equal(fgetline, cookie, getnextac)
 #endif
 #endif
     return FAIL;
 }
-
+#endif
+
+#if defined(FEAT_USR_CMDS) || defined(FEAT_EVAL) || defined(PROTO)
 /*
  * List of names for completion for ":command" with the EXPAND_ flag.
  * Must be alphabetical for completion.
     {EXPAND_USER_VARS, "var"},
     {0, NULL}
 };
-
+#endif
+
+#if defined(FEAT_USR_CMDS) || defined(PROTO)
     static void
 uc_list(name, name_len)
     char_u	*name;
     int		vallen;
     int		*complp;
     long	*argt;
-    char_u	**compl_arg;
+    char_u	**compl_arg UNUSED;
 {
     char_u	*arg = NULL;
+# if defined(FEAT_EVAL) && defined(FEAT_CMDL_COMPL)
     size_t	arglen = 0;
+# endif
     int		i;
     int		valend = vallen;
 
 	if (value[i] == ',')
 	{
 	    arg = &value[i + 1];
+# if defined(FEAT_EVAL) && defined(FEAT_CMDL_COMPL)
 	    arglen = vallen - i - 1;
+# endif
 	    valend = i;
 	    break;
 	}
 #endif
 
 /*
+ * +python and +python3 require FEAT_EVAL.
+ */
+#if !defined(FEAT_EVAL) && (defined(FEAT_PYTHON3) || defined(FEAT_PYTHON))
+# define FEAT_EVAL
+#endif
+
+/*
  * +profile		Profiling for functions and scripts.
  */
 #if defined(FEAT_HUGE) \

src/gui_gtk_x11.c

     return FAIL;
 }
 
-#if defined(FEAT_TITLE) \
-	|| defined(PROTO)
+#if defined(FEAT_TITLE) || defined(FEAT_EVAL) || defined(PROTO)
 /*
  * Return the text window-id and display.  Only required for X-based GUI's
  */
     return result;
 }
 
-#ifdef FEAT_EVAL
 /*
  * Function to translate a typval_T into a PyObject; this will recursively
  * translate lists/dictionaries into their Python equivalents.
 
     return result;
 }
-#endif
 
     static PyObject *
 VimEval(PyObject *self UNUSED, PyObject *args UNUSED)
 {
-#ifdef FEAT_EVAL
     char	*expr;
     typval_T	*our_tv;
     PyObject	*result;
     Py_END_ALLOW_THREADS
 
     return result;
-#else
-    PyErr_SetVim(_("expressions disabled at compile time"));
-    return NULL;
-#endif
 }
 
 static PyObject *ConvertToPyObject(typval_T *);
     static PyObject *
 VimEvalPy(PyObject *self UNUSED, PyObject *args UNUSED)
 {
-#ifdef FEAT_EVAL
     char	*expr;
     typval_T	*our_tv;
     PyObject	*result;
     Py_END_ALLOW_THREADS
 
     return result;
-#else
-    PyErr_SetVim(_("expressions disabled at compile time"));
-    return NULL;
-#endif
 }
 
     static PyObject *
 }
 
     static PyObject *
-DictionaryListKeys(PyObject *self)
+DictionaryListKeys(PyObject *self UNUSED)
 {
     dict_T	*dict = ((DictionaryObject *)(self))->dict;
     long_u	todo = dict->dv_hashtab.ht_used;
     return 0;
 }
 
-#ifdef FEAT_EVAL
 typedef int (*pytotvfunc)(PyObject *, typval_T *, PyObject *);
 
     static int
 	    return NULL;
     }
 }
-#endif
 {
 #ifdef FEAT_EVAL
     char_u	*(argv[1]);
+# ifdef FEAT_VIRTUALEDIT
     int		save_virtual_op = virtual_op;
+# endif
 
     if (*p_opfunc == NUL)
 	EMSG(_("E774: 'operatorfunc' is empty"));
 	else
 	    argv[0] = (char_u *)"char";
 
+# ifdef FEAT_VIRTUALEDIT
 	/* Reset virtual_op so that 'virtualedit' can be changed in the
 	 * function. */
 	virtual_op = MAYBE;
+# endif
 
 	(void)call_func_retnr(p_opfunc, 1, argv, FALSE);
 
+# ifdef FEAT_VIRTUALEDIT
 	virtual_op = save_virtual_op;
+# endif
     }
 #else
     EMSG(_("E775: Eval feature not available"));
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    819,
+/**/
     818,
 /**/
     817,