0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

updated for version 7.3.1070

Problem:    Vim crashes in Python tests. Compiler warning for unused function.
Solution:   Disable the tests for now. Move the function.
This commit is contained in:
Bram Moolenaar 2013-05-30 15:38:24 +02:00
parent fc714b35c6
commit fdde880b02
5 changed files with 21 additions and 12 deletions

View File

@ -2322,18 +2322,6 @@ set_option_value_for(key, numval, stringval, opt_flags, opt_type, from)
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)
{

View File

@ -737,6 +737,21 @@ static PyObject *FunctionGetattr(PyObject *, char *);
}
#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
*/

View File

@ -8,6 +8,8 @@ See http://svn.python.org/view/python/trunk/Misc/README.valgrind?view=markup
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

View File

@ -2,6 +2,8 @@ Tests for various python features. vim: set ft=vim :
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

View File

@ -728,6 +728,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1070,
/**/
1069,
/**/