Mercurial > vim
diff src/if_python.c @ 4645:c316a30a8892 v7.3.1070
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.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Thu, 30 May 2013 15:38:24 +0200 |
parents | 07c534fe9b6c |
children | 542af01979be |
line wrap: on
line diff
--- a/src/if_python.c +++ b/src/if_python.c @@ -737,6 +737,21 @@ static PyObject *FunctionGetattr(PyObjec } #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 */