1
0
mirror of https://github.com/moparisthebest/hexchat synced 2024-11-26 03:02:17 -05:00

Add hexchat module to python interface

This commit is contained in:
TingPing 2013-04-08 17:07:13 -03:00
parent d13ae114a2
commit 68b6be11d6

View File

@ -1171,6 +1171,11 @@ Plugin_New(char *filename, PyMethodDef *xchat_methods, PyObject *xcoobj)
hexchat_print(ph, "Can't create xchat module"); hexchat_print(ph, "Can't create xchat module");
goto error; goto error;
} }
m = Py_InitModule("hexchat", xchat_methods);
if (m == NULL) {
hexchat_print(ph, "Can't create hexchat module");
goto error;
}
PyModule_AddIntConstant(m, "EAT_NONE", HEXCHAT_EAT_NONE); PyModule_AddIntConstant(m, "EAT_NONE", HEXCHAT_EAT_NONE);
PyModule_AddIntConstant(m, "EAT_XCHAT", HEXCHAT_EAT_HEXCHAT); PyModule_AddIntConstant(m, "EAT_XCHAT", HEXCHAT_EAT_HEXCHAT);