changeset 4143:f5ef9b9c18cd v7.3.824

updated for version 7.3.824 Problem: Can redefine builtin functions. (ZyX) Solution: Disallow adding a function to g:.
author Bram Moolenaar <bram@vim.org>
date Wed, 20 Feb 2013 15:19:43 +0100
parents 839d3e84696d
children d6c338c94253
files src/eval.c src/version.c
diffstat 2 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/eval.c
+++ b/src/eval.c
@@ -21164,6 +21164,9 @@ ex_function(eap)
 	    if (arg[j] != NUL)
 		emsg_funcname((char *)e_invarg2, arg);
 	}
+	/* Disallow using the g: dict. */
+	if (fudi.fd_dict != NULL && fudi.fd_dict->dv_scope == VAR_DEF_SCOPE)
+	    EMSG(_("E862: Cannot use g: here"));
     }
 
     /*
--- a/src/version.c
+++ b/src/version.c
@@ -726,6 +726,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    824,
+/**/
     823,
 /**/
     822,