From b96b3953cf93146b9913f69ab0da63826936d837 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Sat, 26 Dec 2015 09:38:06 +1100 Subject: [PATCH] Python: add the new "comm" type to the python namespace also initialise it properly. Signed-off-by: NeilBrown --- lang-python.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lang-python.c b/lang-python.c index 7935cfcb..d167bfc4 100644 --- a/lang-python.c +++ b/lang-python.c @@ -982,10 +982,13 @@ void edlib_init(struct editor *ed) PaneType.tp_new = PyType_GenericNew; MarkType.tp_new = PyType_GenericNew; + CommType.tp_new = PyType_GenericNew; if (PyType_Ready(&PaneType) < 0) return; if (PyType_Ready(&MarkType) < 0) return; + if (PyType_Ready(&CommType) < 0) + return; m = Py_InitModule3("edlib", NULL, "edlib - one more editor is never enough."); @@ -997,6 +1000,7 @@ void edlib_init(struct editor *ed) Py_INCREF(&MarkType); PyModule_AddObject(m, "pane", (PyObject *)&PaneType); PyModule_AddObject(m, "mark", (PyObject *)&MarkType); + PyModule_AddObject(m, "comm", (PyObject *)&CommType); key_add(ed->commands, "python-load", &python_load); Edlib_CommandFailed = PyErr_NewException("edlib.commandfailed", NULL, NULL); -- 2.39.5