To: vim_dev@googlegroups.com
Subject: Patch 7.3.806
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 7.3.806
Problem:    Compiler warnings in Perl code when building with Visual studio
	    2012. (skeept)
Solution:   Add type casts. (Christian Brabandt, 2013 Jan 30)
Files:	    src/if_perl.xs


*** ../vim-7.3.805/src/if_perl.xs	2012-09-21 12:50:44.000000000 +0200
--- src/if_perl.xs	2013-02-06 19:55:12.000000000 +0100
***************
*** 1048,1054 ****
  	{
  	    SV *sv = ST(i);
  	    if (SvIOK(sv))
! 		b = SvIV(ST(i));
  	    else
  	    {
  		char_u *pat;
--- 1048,1054 ----
  	{
  	    SV *sv = ST(i);
  	    if (SvIOK(sv))
! 		b = (int) SvIV(ST(i));
  	    else
  	    {
  		char_u *pat;
***************
*** 1091,1097 ****
      {
  	for (i = 0; i < items; i++)
  	{
! 	    w = SvIV(ST(i));
  	    vimwin = win_find_nr(w);
  	    if (vimwin)
  		XPUSHs(newWINrv(newSV(0), vimwin));
--- 1091,1097 ----
      {
  	for (i = 0; i < items; i++)
  	{
! 	    w = (int) SvIV(ST(i));
  	    vimwin = win_find_nr(w);
  	    if (vimwin)
  		XPUSHs(newWINrv(newSV(0), vimwin));
***************
*** 1154,1161 ****
  
        if (!win_valid(win))
  	  win = curwin;
!       lnum = SvIV(ST(1));
!       col = SvIV(ST(2));
        win->w_cursor.lnum = lnum;
        win->w_cursor.col = col;
        check_cursor();		    /* put cursor on an existing line */
--- 1154,1161 ----
  
        if (!win_valid(win))
  	  win = curwin;
!       lnum = (int) SvIV(ST(1));
!       col = (int) SvIV(ST(2));
        win->w_cursor.lnum = lnum;
        win->w_cursor.col = col;
        check_cursor();		    /* put cursor on an existing line */
***************
*** 1216,1222 ****
      {
  	for (i = 1; i < items; i++)
  	{
! 	    lnum = SvIV(ST(i));
  	    if (lnum > 0 && lnum <= vimbuf->b_ml.ml_line_count)
  	    {
  		line = ml_get_buf(vimbuf, lnum, FALSE);
--- 1216,1222 ----
      {
  	for (i = 1; i < items; i++)
  	{
! 	    lnum = (long) SvIV(ST(i));
  	    if (lnum > 0 && lnum <= vimbuf->b_ml.ml_line_count)
  	    {
  		line = ml_get_buf(vimbuf, lnum, FALSE);
***************
*** 1239,1245 ****
  	if (items < 3)
  	    croak("Usage: VIBUF::Set(vimbuf, lnum, @lines)");
  
! 	lnum = SvIV(ST(1));
  	for(i = 2; i < items; i++, lnum++)
  	{
  	    line = SvPV(ST(i),PL_na);
--- 1239,1245 ----
  	if (items < 3)
  	    croak("Usage: VIBUF::Set(vimbuf, lnum, @lines)");
  
! 	lnum = (long) SvIV(ST(1));
  	for(i = 2; i < items; i++, lnum++)
  	{
  	    line = SvPV(ST(i),PL_na);
***************
*** 1274,1286 ****
      {
  	if (items == 2)
  	{
! 	    lnum = SvIV(ST(1));
  	    count = 1;
  	}
  	else if (items == 3)
  	{
! 	    lnum = SvIV(ST(1));
! 	    count = 1 + SvIV(ST(2)) - lnum;
  	    if (count == 0)
  		count = 1;
  	    if (count < 0)
--- 1274,1286 ----
      {
  	if (items == 2)
  	{
! 	    lnum = (long) SvIV(ST(1));
  	    count = 1;
  	}
  	else if (items == 3)
  	{
! 	    lnum = (long) SvIV(ST(1));
! 	    count = (long) 1 + SvIV(ST(2)) - lnum;
  	    if (count == 0)
  		count = 1;
  	    if (count < 0)
***************
*** 1331,1337 ****
  	if (items < 3)
  	    croak("Usage: VIBUF::Append(vimbuf, lnum, @lines)");
  
! 	lnum = SvIV(ST(1));
  	for (i = 2; i < items; i++, lnum++)
  	{
  	    line = SvPV(ST(i),PL_na);
--- 1331,1337 ----
  	if (items < 3)
  	    croak("Usage: VIBUF::Append(vimbuf, lnum, @lines)");
  
! 	lnum = (long) SvIV(ST(1));
  	for (i = 2; i < items; i++, lnum++)
  	{
  	    line = SvPV(ST(i),PL_na);
*** ../vim-7.3.805/src/version.c	2013-02-06 19:49:38.000000000 +0100
--- src/version.c	2013-02-06 19:58:16.000000000 +0100
***************
*** 727,728 ****
--- 727,730 ----
  {   /* Add new patch number below this line */
+ /**/
+     806,
  /**/

-- 
BRIDGEKEEPER: What is your favorite colour?
LAUNCELOT:    Blue.
BRIDGEKEEPER: Right.  Off you go.
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
