Mercurial > vim
diff src/if_python3.c @ 4350:7eaccdaa5304 v7.3.924
updated for version 7.3.924
Problem: Python interface can't easily access options.
Solution: Add vim.options, vim.window.options and vim.buffer.options. (ZyX)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Mon, 06 May 2013 03:52:55 +0200 |
parents | f1eab4f77a6f |
children | 04736b4030ec |
line wrap: on
line diff
--- a/src/if_python3.c +++ b/src/if_python3.c @@ -1628,6 +1628,7 @@ Py3Init_vim(void) PyType_Ready(&DictionaryType); PyType_Ready(&ListType); PyType_Ready(&FunctionType); + PyType_Ready(&OptionsType); /* Set sys.argv[] to avoid a crash in warn(). */ PySys_SetArgv(1, argv); @@ -1649,6 +1650,8 @@ Py3Init_vim(void) PyModule_AddObject(mod, "vars", DictionaryNew(&globvardict)); PyModule_AddObject(mod, "vvars", DictionaryNew(&vimvardict)); + PyModule_AddObject(mod, "options", + OptionsNew(SREQ_GLOBAL, NULL, dummy_check, NULL)); #define ADD_INT_CONSTANT(name, value) \ tmp = PyLong_FromLong(value); \