diff options
author | Bram Moolenaar <Bram@vim.org> | 2013-05-29 22:02:22 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2013-05-29 22:02:22 +0200 |
commit | e9ba516be2873b80e51aa24cd6c25f9b29612695 (patch) | |
tree | 620ac235a6fe7dab512cfc871b7e63ba99bba761 /src/if_python.c | |
parent | 1bc2428e1f7782870ae9e304f0db2388fe4a5a14 (diff) | |
download | vim-git-e9ba516be2873b80e51aa24cd6c25f9b29612695.tar.gz |
updated for version 7.3.1042v7.3.1042
Problem: Python: can't assign to vim.Buffer.name.
Solution: Python patch 3. (ZyX)
Diffstat (limited to 'src/if_python.c')
-rw-r--r-- | src/if_python.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/src/if_python.c b/src/if_python.c index 08d67d604..2d695a56d 100644 --- a/src/if_python.c +++ b/src/if_python.c @@ -676,18 +676,6 @@ get_exceptions(void) static int initialised = 0; #define PYINITIALISED initialised -#define DICTKEY_GET(err) \ - if (!PyString_Check(keyObject)) \ - { \ - PyErr_SetString(PyExc_TypeError, _("only string keys are allowed")); \ - return err; \ - } \ - if (PyString_AsStringAndSize(keyObject, (char **) &key, NULL) == -1) \ - return err; - -#define DICTKEY_UNREF -#define DICTKEY_DECL - #define DESTRUCTOR_FINISH(self) self->ob_type->tp_free((PyObject*)self); #define WIN_PYTHON_REF(win) win->w_python_ref @@ -926,7 +914,7 @@ DoPyCommand(const char *cmd, rangeinitializer init_range, runner run, void *arg) else { /* Need to make a copy, value may change when setting new locale. */ - saved_locale = (char *)vim_strsave((char_u *)saved_locale); + saved_locale = (char *) PY_STRSAVE(saved_locale); (void)setlocale(LC_NUMERIC, "C"); } #endif @@ -953,7 +941,7 @@ DoPyCommand(const char *cmd, rangeinitializer init_range, runner run, void *arg) if (saved_locale != NULL) { (void)setlocale(LC_NUMERIC, saved_locale); - vim_free(saved_locale); + PyMem_Free(saved_locale); } #endif |