diff options
author | Bram Moolenaar <Bram@vim.org> | 2013-05-06 03:52:55 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2013-05-06 03:52:55 +0200 |
commit | 84e0f6ca9adcbdca254060713878ebc29faaaa65 (patch) | |
tree | 3025211efa4e5c1d9f48e9f369ecd786713b6c69 /src/if_python.c | |
parent | d1864597a0d87fa9b3fbd09fc022b3405be7f274 (diff) | |
download | vim-git-84e0f6ca9adcbdca254060713878ebc29faaaa65.tar.gz |
updated for version 7.3.924v7.3.924
Problem: Python interface can't easily access options.
Solution: Add vim.options, vim.window.options and vim.buffer.options. (ZyX)
Diffstat (limited to 'src/if_python.c')
-rw-r--r-- | src/if_python.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/if_python.c b/src/if_python.c index 6e1cb0c0f..fb2d8986b 100644 --- a/src/if_python.c +++ b/src/if_python.c @@ -1341,6 +1341,7 @@ PythonMod_Init(void) PyType_Ready(&BufListType); PyType_Ready(&WinListType); PyType_Ready(&CurrentType); + PyType_Ready(&OptionsType); /* Set sys.argv[] to avoid a crash in warn(). */ PySys_SetArgv(1, argv); @@ -1360,6 +1361,9 @@ PythonMod_Init(void) tmp = DictionaryNew(&vimvardict); PyDict_SetItemString(dict, "vvars", tmp); Py_DECREF(tmp); + tmp = OptionsNew(SREQ_GLOBAL, NULL, dummy_check, NULL); + PyDict_SetItemString(dict, "options", tmp); + Py_DECREF(tmp); PyDict_SetItemString(dict, "VAR_LOCKED", PyInt_FromLong(VAR_LOCKED)); PyDict_SetItemString(dict, "VAR_FIXED", PyInt_FromLong(VAR_FIXED)); PyDict_SetItemString(dict, "VAR_SCOPE", PyInt_FromLong(VAR_SCOPE)); |