summaryrefslogtreecommitdiff
path: root/src/eval.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2012-04-05 16:54:08 +0200
committerBram Moolenaar <Bram@vim.org>2012-04-05 16:54:08 +0200
commit1dced5727f8f4f51fd623d9f6e672e70e1793d13 (patch)
treee1c77c699008f7096d30aef926bf4265615ba597 /src/eval.c
parente0ebfd75077c5010f31fcecefb87f9fe06889131 (diff)
downloadvim-git-1dced5727f8f4f51fd623d9f6e672e70e1793d13.tar.gz
updated for version 7.3.490v7.3.490
Problem: Member confusion in Lua interface. Solution: Fix it. Add luaeval(). (Taro Muraoka, Luis Carvalho)
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/eval.c b/src/eval.c
index bf0363ab5..d460a83be 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -622,6 +622,9 @@ static void f_localtime __ARGS((typval_T *argvars, typval_T *rettv));
static void f_log __ARGS((typval_T *argvars, typval_T *rettv));
static void f_log10 __ARGS((typval_T *argvars, typval_T *rettv));
#endif
+#ifdef FEAT_LUA
+static void f_luaeval __ARGS((typval_T *argvars, typval_T *rettv));
+#endif
static void f_map __ARGS((typval_T *argvars, typval_T *rettv));
static void f_maparg __ARGS((typval_T *argvars, typval_T *rettv));
static void f_mapcheck __ARGS((typval_T *argvars, typval_T *rettv));
@@ -6777,6 +6780,10 @@ garbage_collect()
/* v: vars */
set_ref_in_ht(&vimvarht, copyID);
+#ifdef FEAT_LUA
+ set_ref_in_lua(copyID);
+#endif
+
/*
* 2. Free lists and dictionaries that are not referenced.
*/
@@ -7946,6 +7953,9 @@ static struct fst
{"log", 1, 1, f_log},
{"log10", 1, 1, f_log10},
#endif
+#ifdef FEAT_LUA
+ {"luaeval", 1, 2, f_luaeval},
+#endif
{"map", 2, 2, f_map},
{"maparg", 1, 4, f_maparg},
{"mapcheck", 1, 3, f_mapcheck},
@@ -13626,6 +13636,23 @@ f_log10(argvars, rettv)
}
#endif
+#ifdef FEAT_LUA
+/*
+ * "luaeval()" function
+ */
+ static void
+f_luaeval(argvars, rettv)
+ typval_T *argvars;
+ typval_T *rettv;
+{
+ char_u *str;
+ char_u buf[NUMBUFLEN];
+
+ str = get_tv_string_buf(&argvars[0], buf);
+ do_luaeval(str, argvars + 1, rettv);
+}
+#endif
+
/*
* "map()" function
*/