Mercurial > vim
diff src/if_python3.c @ 4323:f1eab4f77a6f v7.3.911
updated for version 7.3.911
Problem: Python: Access to Vim variables is not so easy.
Solution: Define vim.vars and vim.vvars. (ZyX)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Wed, 24 Apr 2013 14:07:45 +0200 |
parents | b79f3c3a584c |
children | 7eaccdaa5304 |
line wrap: on
line diff
--- a/src/if_python3.c +++ b/src/if_python3.c @@ -1647,6 +1647,9 @@ Py3Init_vim(void) Py_INCREF((PyObject *)(void *)&TheWindowList); PyModule_AddObject(mod, "windows", (PyObject *)(void *)&TheWindowList); + PyModule_AddObject(mod, "vars", DictionaryNew(&globvardict)); + PyModule_AddObject(mod, "vvars", DictionaryNew(&vimvardict)); + #define ADD_INT_CONSTANT(name, value) \ tmp = PyLong_FromLong(value); \ Py_INCREF(tmp); \