changeset 8214:51b4fba718bf v7.4.1400

commit https://github.com/vim/vim/commit/254ebaf068919407de6bd83ac905bd2f36ad944e Author: Bram Moolenaar <Bram@vim.org> Date: Tue Feb 23 16:06:28 2016 +0100 patch 7.4.1400 Problem: Perl eval doesn't work properly on 64-bit big-endian machine. Solution: Use 32 bit type for the key. (Danek Duvall)
author Christian Brabandt <cb@256bit.org>
date Tue, 23 Feb 2016 16:15:05 +0100
parents f32121fdfaa7
children 3df75966ef43
files src/if_perl.xs src/version.c
diffstat 2 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/if_perl.xs
+++ b/src/if_perl.xs
@@ -1097,7 +1097,7 @@ perl_to_vim(SV *sv, typval_T *rettv)
 	case SVt_PVHV:	/* dictionary */
 	{
 	    HE *		entry;
-	    size_t		key_len;
+	    I32			key_len;
 	    char *		key;
 	    dictitem_T *	item;
 	    SV *		item2;
@@ -1121,9 +1121,9 @@ perl_to_vim(SV *sv, typval_T *rettv)
 		for (entry = hv_iternext((HV *)sv); entry; entry = hv_iternext((HV *)sv))
 		{
 		    key_len = 0;
-		    key = hv_iterkey(entry, (I32 *)&key_len);
+		    key = hv_iterkey(entry, &key_len);
 
-		    if (!key || !key_len || strlen(key) < key_len) {
+		    if (!key || !key_len || strlen(key) < (size_t)key_len) {
 			EMSG2("Malformed key Dictionary '%s'", key && *key ? key : "(empty)");
 			break;
 		    }
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1400,
+/**/
     1399,
 /**/
     1398,