File: gsfmodule.c

package info (click to toggle)
libgsf 1.14.3-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 4,644 kB
  • ctags: 3,140
  • sloc: ansic: 16,511; sh: 9,076; xml: 6,155; makefile: 454; perl: 35; python: 13
file content (45 lines) | stat: -rw-r--r-- 1,176 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*
 * gsfmodule.c
 *
 * Copyright (C) 2002-2003 Jon K Hellan (hellan@acm.org)
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of version 2.1 of the GNU Lesser General Public
 * License as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
 * USA
 */

/* 
 * Python bindings for libgsf.
 */

#include <pygobject.h>

extern PyMethodDef pygsf_functions[];
extern DL_EXPORT(void) init_gsf (void);

DL_EXPORT(void)
init_gsf (void)
{
	PyObject *m, *d;

	init_pygobject ();

	m = Py_InitModule ((char *) "_gsf", pygsf_functions);
	d = PyModule_GetDict (m);

	pygsf_register_classes (d);
	
	if (PyErr_Occurred ()) {
		Py_FatalError ((char *) "can't initialise module gsf");
	}
}