/[weechat]/weechat/src/plugins/scripts/python/weechat-python.c
ViewVC logotype

Diff of /weechat/src/plugins/scripts/python/weechat-python.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.8 by flashcode, Fri Oct 28 07:31:22 2005 UTC revision 1.9 by kolter, Sun Oct 30 23:39:54 2005 UTC
# Line 780  weechat_python_load (t_weechat_plugin *p Line 780  weechat_python_load (t_weechat_plugin *p
780  {  {
781      FILE *fp;      FILE *fp;
782      PyThreadState *python_current_interpreter;      PyThreadState *python_current_interpreter;
783      PyObject *weechat_module, *weechat_outputs;      PyObject *weechat_module, *weechat_outputs, *weechat_dict;
784            
785      plugin->printf_server (plugin, "Loading Python script \"%s\"", filename);      plugin->printf_server (plugin, "Loading Python script \"%s\"", filename);
786            
# Line 825  weechat_python_load (t_weechat_plugin *p Line 825  weechat_python_load (t_weechat_plugin *p
825          return 0;          return 0;
826      }      }
827    
828        /* define some constants */
829        weechat_dict = PyModule_GetDict(weechat_module);
830        PyDict_SetItemString(weechat_dict, "PLUGIN_RC_OK", PyInt_FromLong((long) PLUGIN_RC_OK));
831        PyDict_SetItemString(weechat_dict, "PLUGIN_RC_KO", PyInt_FromLong((long) PLUGIN_RC_KO));
832        PyDict_SetItemString(weechat_dict, "PLUGIN_RC_OK_IGNORE_WEECHAT", PyInt_FromLong((long) PLUGIN_RC_OK_IGNORE_WEECHAT));
833        PyDict_SetItemString(weechat_dict, "PLUGIN_RC_OK_IGNORE_PLUGINS", PyInt_FromLong((long) PLUGIN_RC_OK_IGNORE_PLUGINS));
834        PyDict_SetItemString(weechat_dict, "PLUGIN_RC_OK_IGNORE_ALL", PyInt_FromLong((long) PLUGIN_RC_OK_IGNORE_ALL));
835        
836      weechat_outputs = Py_InitModule("weechatOutputs", weechat_python_output_funcs);      weechat_outputs = Py_InitModule("weechatOutputs", weechat_python_output_funcs);
837      if (weechat_outputs == NULL)      if (weechat_outputs == NULL)
838      {      {

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26