File: gtkhtml2module.c

package info (click to toggle)
gnome-python-extras 2.14.3-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 2,756 kB
  • ctags: 731
  • sloc: sh: 8,856; ansic: 5,011; xml: 1,319; python: 725; makefile: 415
file content (29 lines) | stat: -rw-r--r-- 661 bytes parent folder | download | duplicates (5)
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
/* -*- Mode: C; c-basic-offset: 4 -*- */
#include <Python.h>
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <libgtkhtml/gtkhtml.h>

/* include this first, before NO_IMPORT_PYGOBJECT is defined */
#include <pygobject.h>

void pygtkhtml2_register_classes(PyObject *d);
extern PyMethodDef pygtkhtml2_functions[];

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

	init_pygobject ();

	/* gtkhtml2 calls this lazily, but only if you create a
	 * context first.  We call it to avoid segfaulting */
	html_atom_list_initialize();

	m = Py_InitModule ("gtkhtml2", pygtkhtml2_functions);
	d = PyModule_GetDict (m);

	pygtkhtml2_register_classes (d);
}