diff src/ops.c @ 27018:268f6a3511df v8.2.4038

patch 8.2.4038: various code not used when features are disabled Commit: https://github.com/vim/vim/commit/748b308eebe8d8860888eb27da08333f175d547d Author: Dominique Pelle <dominique.pelle@gmail.com> Date: Sat Jan 8 12:41:16 2022 +0000 patch 8.2.4038: various code not used when features are disabled Problem: Various code not used when features are disabled. Solution: Add #ifdefs. (Dominique Pell?, closes https://github.com/vim/vim/issues/9491)
author Bram Moolenaar <Bram@vim.org>
date Sat, 08 Jan 2022 13:45:04 +0100
parents d92e0d85923f
children a9eeb18e749c
line wrap: on
line diff
--- a/src/ops.c
+++ b/src/ops.c
@@ -3350,6 +3350,7 @@ free_operatorfunc_option(void)
 }
 #endif
 
+#if defined(FEAT_EVAL) || defined(PROTO)
 /*
  * Mark the global 'operatorfunc' callback with 'copyID' so that it is not
  * garbage collected.
@@ -3359,12 +3360,11 @@ set_ref_in_opfunc(int copyID UNUSED)
 {
     int abort = FALSE;
 
-#ifdef FEAT_EVAL
     abort = set_ref_in_callback(&opfunc_cb, copyID);
-#endif
 
     return abort;
 }
+#endif
 
 /*
  * Handle the "g@" operator: call 'operatorfunc'.