Back to index

libindicate  12.10.0
indicatemodule.c
Go to the documentation of this file.
00001 /*
00002 Python bindings for libindicate.
00003 
00004 Copyright 2009 Canonical Ltd.
00005 
00006 Authors:
00007     Eitan Isaacson <eitan@ascender.com>
00008 
00009 This program is free software: you can redistribute it and/or modify it 
00010 under the terms of either or both of the following licenses:
00011 
00012 1) the GNU Lesser General Public License version 3, as published by the 
00013 Free Software Foundation; and/or
00014 2) the GNU Lesser General Public License version 2.1, as published by 
00015 the Free Software Foundation.
00016 
00017 This program is distributed in the hope that it will be useful, but 
00018 WITHOUT ANY WARRANTY; without even the implied warranties of 
00019 MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR 
00020 PURPOSE.  See the applicable version of the GNU Lesser General Public 
00021 License for more details.
00022 
00023 You should have received a copy of both the GNU Lesser General Public 
00024 License version 3 and version 2.1 along with this program.  If not, see 
00025 <http://www.gnu.org/licenses/>
00026 */
00027 #include <pygobject.h>
00028  
00029 void pyindicate_register_classes (PyObject *d); 
00030 extern PyMethodDef pyindicate_functions[];
00031 
00032 DL_EXPORT(void)
00033 init_indicate(void)
00034 {
00035               PyObject *m, *d;
00036               
00037               init_pygobject ();
00038               
00039               m = Py_InitModule ("_indicate", pyindicate_functions);
00040               d = PyModule_GetDict (m);
00041               
00042               pyindicate_register_classes (d);
00043 
00044               _indicate_add_constants (m, "INDICATE_");
00045               if (PyErr_Occurred ()) {
00046                             Py_FatalError ("can't initialise module indicate");
00047               }
00048 }