| To: vim_dev@googlegroups.com |
| Subject: Patch 7.3.1070 |
| 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.1070 |
| Problem: Vim crashes in Python tests. Compiler warning for unused function. |
| Solution: Disable the tests for now. Move the function. |
| Files: src/if_py_both.h, src/if_python.c, src/testdir/test86.in, |
| src/testdir/test87.in |
| |
| |
| |
| |
| |
| *** 2322,2339 **** |
| return VimTryEnd(); |
| } |
| |
| - static void * |
| - py_memsave(void *p, size_t len) |
| - { |
| - void *r; |
| - if (!(r = PyMem_Malloc(len))) |
| - return NULL; |
| - mch_memmove(r, p, len); |
| - return r; |
| - } |
| - |
| - #define PY_STRSAVE(s) ((char_u *) py_memsave(s, STRLEN(s) + 1)) |
| - |
| static int |
| OptionsAssItem(OptionsObject *self, PyObject *keyObject, PyObject *valObject) |
| { |
| --- 2322,2327 ---- |
| |
| |
| |
| *** 737,742 **** |
| --- 737,757 ---- |
| } |
| #endif |
| |
| + #if defined(HAVE_LOCALE_H) || defined(X_LOCALE) |
| + static void * |
| + py_memsave(void *p, size_t len) |
| + { |
| + void *r; |
| + |
| + if (!(r = PyMem_Malloc(len))) |
| + return NULL; |
| + mch_memmove(r, p, len); |
| + return r; |
| + } |
| + |
| + # define PY_STRSAVE(s) ((char_u *) py_memsave(s, STRLEN(s) + 1)) |
| + #endif |
| + |
| /* |
| * Include the code shared with if_python3.c |
| */ |
| |
| |
| |
| *** 8,13 **** |
| --- 8,15 ---- |
| STARTTEST |
| :so small.vim |
| :set encoding=latin1 |
| + :" HACK: currently crashes, skip the test |
| + :e! test.ok | wq! test.out |
| :if !has('python') | e! test.ok | wq! test.out | endif |
| :lang C |
| :py import vim |
| |
| |
| |
| *** 2,7 **** |
| --- 2,9 ---- |
| |
| STARTTEST |
| :so small.vim |
| + :" HACK: currently crashes, skip the test |
| + :e! test.ok | wq! test.out |
| :if !has('python3') | e! test.ok | wq! test.out | endif |
| :lang C |
| :py3 import vim |
| |
| |
| |
| *** 730,731 **** |
| --- 730,733 ---- |
| { /* Add new patch number below this line */ |
| + /**/ |
| + 1070, |
| /**/ |
| |
| -- |
| How To Keep A Healthy Level Of Insanity: |
| 13. Go to a poetry recital and ask why the poems don't rhyme. |
| |
| /// 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 /// |