diff src/if_perl.xs @ 9159:6b003ff07234 v7.4.1863

commit https://github.com/vim/vim/commit/9b0ac229bcfc91acabd35fc576055a94c1687c32 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Jun 1 20:31:43 2016 +0200 patch 7.4.1863 Problem: Compiler warnings on Win64. Solution: Adjust types, add type casts. (Ken Takata)
author Christian Brabandt <cb@256bit.org>
date Wed, 01 Jun 2016 20:45:07 +0200
parents 95fd0de7a8f1
children 20e7b99c33d4
line wrap: on
line diff
--- a/src/if_perl.xs
+++ b/src/if_perl.xs
@@ -1075,7 +1075,8 @@ perl_to_vim(SV *sv, typval_T *rettv)
 	{
 	    size_t  len		= 0;
 	    char *  str_from	= SvPV(sv, len);
-	    char_u *str_to	= (char_u*)alloc(sizeof(char_u) * (len + 1));
+	    char_u *str_to	= (char_u*)alloc(
+				      (unsigned)(sizeof(char_u) * (len + 1)));
 
 	    if (str_to) {
 		str_to[len] = '\0';
@@ -1370,13 +1371,13 @@ PerlIOVim_write(pTHX_ PerlIO *f, const v
     char_u *str;
     PerlIOVim * s = PerlIOSelf(f, PerlIOVim);
 
-    str = vim_strnsave((char_u *)vbuf, count);
+    str = vim_strnsave((char_u *)vbuf, (int)count);
     if (str == NULL)
 	return 0;
     msg_split((char_u *)str, s->attr);
     vim_free(str);
 
-    return count;
+    return (SSize_t)count;
 }
 
 static PERLIO_FUNCS_DECL(PerlIO_Vim) = {