Karsten Hopp 02db38
To: vim_dev@googlegroups.com
Karsten Hopp 02db38
Subject: Patch 7.3.1070
Karsten Hopp 02db38
Fcc: outbox
Karsten Hopp 02db38
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 02db38
Mime-Version: 1.0
Karsten Hopp 02db38
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 02db38
Content-Transfer-Encoding: 8bit
Karsten Hopp 02db38
------------
Karsten Hopp 02db38
Karsten Hopp 02db38
Patch 7.3.1070
Karsten Hopp 02db38
Problem:    Vim crashes in Python tests. Compiler warning for unused function.
Karsten Hopp 02db38
Solution:   Disable the tests for now. Move the function.
Karsten Hopp 02db38
Files:	    src/if_py_both.h, src/if_python.c, src/testdir/test86.in,
Karsten Hopp 02db38
	    src/testdir/test87.in
Karsten Hopp 02db38
Karsten Hopp 02db38
Karsten Hopp 02db38
*** ../vim-7.3.1069/src/if_py_both.h	2013-05-30 14:52:32.000000000 +0200
Karsten Hopp 02db38
--- src/if_py_both.h	2013-05-30 15:09:46.000000000 +0200
Karsten Hopp 02db38
***************
Karsten Hopp 02db38
*** 2322,2339 ****
Karsten Hopp 02db38
      return VimTryEnd();
Karsten Hopp 02db38
  }
Karsten Hopp 02db38
  
Karsten Hopp 02db38
-     static void *
Karsten Hopp 02db38
- py_memsave(void *p, size_t len)
Karsten Hopp 02db38
- {
Karsten Hopp 02db38
-     void	*r;
Karsten Hopp 02db38
-     if (!(r = PyMem_Malloc(len)))
Karsten Hopp 02db38
- 	return NULL;
Karsten Hopp 02db38
-     mch_memmove(r, p, len);
Karsten Hopp 02db38
-     return r;
Karsten Hopp 02db38
- }
Karsten Hopp 02db38
- 
Karsten Hopp 02db38
- #define PY_STRSAVE(s) ((char_u *) py_memsave(s, STRLEN(s) + 1))
Karsten Hopp 02db38
- 
Karsten Hopp 02db38
      static int
Karsten Hopp 02db38
  OptionsAssItem(OptionsObject *self, PyObject *keyObject, PyObject *valObject)
Karsten Hopp 02db38
  {
Karsten Hopp 02db38
--- 2322,2327 ----
Karsten Hopp 02db38
*** ../vim-7.3.1069/src/if_python.c	2013-05-30 13:22:07.000000000 +0200
Karsten Hopp 02db38
--- src/if_python.c	2013-05-30 15:12:08.000000000 +0200
Karsten Hopp 02db38
***************
Karsten Hopp 02db38
*** 737,742 ****
Karsten Hopp 02db38
--- 737,757 ----
Karsten Hopp 02db38
      }
Karsten Hopp 02db38
  #endif
Karsten Hopp 02db38
  
Karsten Hopp 02db38
+ #if defined(HAVE_LOCALE_H) || defined(X_LOCALE)
Karsten Hopp 02db38
+     static void *
Karsten Hopp 02db38
+ py_memsave(void *p, size_t len)
Karsten Hopp 02db38
+ {
Karsten Hopp 02db38
+     void	*r;
Karsten Hopp 02db38
+ 
Karsten Hopp 02db38
+     if (!(r = PyMem_Malloc(len)))
Karsten Hopp 02db38
+ 	return NULL;
Karsten Hopp 02db38
+     mch_memmove(r, p, len);
Karsten Hopp 02db38
+     return r;
Karsten Hopp 02db38
+ }
Karsten Hopp 02db38
+ 
Karsten Hopp 02db38
+ # define PY_STRSAVE(s) ((char_u *) py_memsave(s, STRLEN(s) + 1))
Karsten Hopp 02db38
+ #endif
Karsten Hopp 02db38
+ 
Karsten Hopp 02db38
  /*
Karsten Hopp 02db38
   * Include the code shared with if_python3.c
Karsten Hopp 02db38
   */
Karsten Hopp 02db38
*** ../vim-7.3.1069/src/testdir/test86.in	2013-05-30 13:28:37.000000000 +0200
Karsten Hopp 02db38
--- src/testdir/test86.in	2013-05-30 15:13:46.000000000 +0200
Karsten Hopp 02db38
***************
Karsten Hopp 02db38
*** 8,13 ****
Karsten Hopp 02db38
--- 8,15 ----
Karsten Hopp 02db38
  STARTTEST
Karsten Hopp 02db38
  :so small.vim
Karsten Hopp 02db38
  :set encoding=latin1
Karsten Hopp 02db38
+ :" HACK: currently crashes, skip the test
Karsten Hopp 02db38
+ :e! test.ok | wq! test.out
Karsten Hopp 02db38
  :if !has('python') | e! test.ok | wq! test.out | endif
Karsten Hopp 02db38
  :lang C
Karsten Hopp 02db38
  :py import vim
Karsten Hopp 02db38
*** ../vim-7.3.1069/src/testdir/test87.in	2013-05-30 13:28:37.000000000 +0200
Karsten Hopp 02db38
--- src/testdir/test87.in	2013-05-30 15:13:55.000000000 +0200
Karsten Hopp 02db38
***************
Karsten Hopp 02db38
*** 2,7 ****
Karsten Hopp 02db38
--- 2,9 ----
Karsten Hopp 02db38
  
Karsten Hopp 02db38
  STARTTEST
Karsten Hopp 02db38
  :so small.vim
Karsten Hopp 02db38
+ :" HACK: currently crashes, skip the test
Karsten Hopp 02db38
+ :e! test.ok | wq! test.out
Karsten Hopp 02db38
  :if !has('python3') | e! test.ok | wq! test.out | endif
Karsten Hopp 02db38
  :lang C
Karsten Hopp 02db38
  :py3 import vim
Karsten Hopp 02db38
*** ../vim-7.3.1069/src/version.c	2013-05-30 14:52:32.000000000 +0200
Karsten Hopp 02db38
--- src/version.c	2013-05-30 15:36:00.000000000 +0200
Karsten Hopp 02db38
***************
Karsten Hopp 02db38
*** 730,731 ****
Karsten Hopp 02db38
--- 730,733 ----
Karsten Hopp 02db38
  {   /* Add new patch number below this line */
Karsten Hopp 02db38
+ /**/
Karsten Hopp 02db38
+     1070,
Karsten Hopp 02db38
  /**/
Karsten Hopp 02db38
Karsten Hopp 02db38
-- 
Karsten Hopp 02db38
How To Keep A Healthy Level Of Insanity:
Karsten Hopp 02db38
13. Go to a poetry recital and ask why the poems don't rhyme.
Karsten Hopp 02db38
Karsten Hopp 02db38
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 02db38
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 02db38
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp 02db38
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///