changeset 16646:ea0f9a2df961 v8.1.1325

patch 8.1.1325: cannot build with +eval but without +channel and +timers commit https://github.com/vim/vim/commit/97b0075b0d733cc58c29247b09e7887b9991d7bf Author: Bram Moolenaar <Bram@vim.org> Date: Sun May 12 13:07:14 2019 +0200 patch 8.1.1325: cannot build with +eval but without +channel and +timers Problem: Cannot build with +eval but without +channel and +timers. (John Marriott) Solution: Adjust #ifdef for get_callback().
author Bram Moolenaar <Bram@vim.org>
date Sun, 12 May 2019 13:15:06 +0200
parents 6453e4aec575
children 8dc2b6916321
files src/evalfunc.c src/testdir/test_autocmd.vim src/version.c
diffstat 3 files changed, 27 insertions(+), 25 deletions(-) [+]
line wrap: on
line diff
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -14675,7 +14675,6 @@ f_test_settime(typval_T *argvars, typval
     time_for_testing = (time_t)tv_get_number(&argvars[0]);
 }
 
-#if defined(FEAT_JOB_CHANNEL) || defined(FEAT_TIMERS) || defined(PROTO)
 /*
  * Get a callback from "arg".  It can be a Funcref or a function name.
  * When "arg" is zero return an empty string.
@@ -14716,7 +14715,6 @@ free_callback(char_u *callback, partial_
 	vim_free(callback);
     }
 }
-#endif
 
 #ifdef FEAT_TIMERS
 /*
--- a/src/testdir/test_autocmd.vim
+++ b/src/testdir/test_autocmd.vim
@@ -18,6 +18,7 @@ func Test_vim_did_enter()
 endfunc
 
 if has('timers')
+
   func ExitInsertMode(id)
     call feedkeys("\<Esc>")
   endfunc
@@ -70,7 +71,30 @@ if has('timers')
     au! CursorHoldI
     set updatetime&
   endfunc
-endif
+
+  func Test_OptionSet_modeline()
+    call test_override('starting', 1)
+    au! OptionSet
+    augroup set_tabstop
+      au OptionSet tabstop call timer_start(1, {-> execute("echo 'Handler called'", "")})
+    augroup END
+    call writefile(['vim: set ts=7 sw=5 :', 'something'], 'XoptionsetModeline')
+    set modeline
+    let v:errmsg = ''
+    call assert_fails('split XoptionsetModeline', 'E12:')
+    call assert_equal(7, &ts)
+    call assert_equal('', v:errmsg)
+
+    augroup set_tabstop
+      au!
+    augroup END
+    bwipe!
+    set ts&
+    call delete('XoptionsetModeline')
+    call test_override('starting', 0)
+  endfunc
+
+endif "has('timers')
 
 func Test_bufunload()
   augroup test_bufunload_group
@@ -673,28 +697,6 @@ func Test_OptionSet_diffmode_close()
   "delfunc! AutoCommandOptionSet
 endfunc
 
-func Test_OptionSet_modeline()
-  call test_override('starting', 1)
-  au! OptionSet
-  augroup set_tabstop
-    au OptionSet tabstop call timer_start(1, {-> execute("echo 'Handler called'", "")})
-  augroup END
-  call writefile(['vim: set ts=7 sw=5 :', 'something'], 'XoptionsetModeline')
-  set modeline
-  let v:errmsg = ''
-  call assert_fails('split XoptionsetModeline', 'E12:')
-  call assert_equal(7, &ts)
-  call assert_equal('', v:errmsg)
-
-  augroup set_tabstop
-    au!
-  augroup END
-  bwipe!
-  set ts&
-  call delete('XoptionsetModeline')
-  call test_override('starting', 0)
-endfunc
-
 " Test for Bufleave autocommand that deletes the buffer we are about to edit.
 func Test_BufleaveWithDelete()
   new | edit Xfile1
--- a/src/version.c
+++ b/src/version.c
@@ -768,6 +768,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1325,
+/**/
     1324,
 /**/
     1323,