aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.h
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-04-14 10:58:29 +0800
committerGitHub <noreply@github.com>2023-04-14 10:58:29 +0800
commit37bb40701d672d5213ec1be4e21d7808aee968e7 (patch)
tree8f2c7db06448099e9ee768e2dbd718514e5ef9ca /src/nvim/eval.h
parentf64f6706e58061f0a3de530edd1f10e331cd1525 (diff)
parente8c25aac8d864e7033bcfe4640ee44054035f61d (diff)
downloadrneovim-37bb40701d672d5213ec1be4e21d7808aee968e7.tar.gz
rneovim-37bb40701d672d5213ec1be4e21d7808aee968e7.tar.bz2
rneovim-37bb40701d672d5213ec1be4e21d7808aee968e7.zip
Merge pull request #23078 from zeertzjq/vim-8.2.1047
vim-patch:8.2.{1047,1048,1049,1050,1052},9.0.1447
Diffstat (limited to 'src/nvim/eval.h')
-rw-r--r--src/nvim/eval.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/nvim/eval.h b/src/nvim/eval.h
index 973a4a1fc3..4f517551c6 100644
--- a/src/nvim/eval.h
+++ b/src/nvim/eval.h
@@ -266,11 +266,26 @@ typedef int (*ex_unletlock_callback)(lval_T *, char *, exarg_T *, int);
// Used for checking if local variables or arguments used in a lambda.
extern bool *eval_lavars_used;
+/// Struct passed through eval() functions.
+/// See EVALARG_EVALUATE for a fixed value with eval_flags set to EVAL_EVALUATE.
+typedef struct {
+ int eval_flags; ///< EVAL_ flag values below
+
+ /// copied from exarg_T when "getline" is "getsourceline". Can be NULL.
+ void *eval_cookie; // argument for getline()
+
+ /// pointer to the line obtained with getsourceline()
+ char *eval_tofree;
+} evalarg_T;
+
/// Flag for expression evaluation.
enum {
EVAL_EVALUATE = 1, ///< when missing don't actually evaluate
};
+/// Passed to an eval() function to enable evaluation.
+EXTERN evalarg_T EVALARG_EVALUATE INIT(= { EVAL_EVALUATE, NULL, NULL });
+
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "eval.h.generated.h"
#endif