File: boot.c

package info (click to toggle)
gnumeric 1.12.44-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 112,672 kB
  • sloc: ansic: 293,830; xml: 56,297; perl: 6,093; sh: 4,527; makefile: 2,940; yacc: 1,341; python: 384
file content (45 lines) | stat: -rw-r--r-- 895 bytes parent folder | download | duplicates (4)
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
/*
 * boot.c
 *
 */

#include <gnumeric-config.h>
#include <gnumeric.h>
#include <glib.h>
#include <goffice/goffice.h>
#include <gnm-plugin.h>

#include "perl-loader.h"

static GSList *stuff_to_free;

GNM_PLUGIN_MODULE_HEADER;

void
gnm_perl_loader_free_later (gconstpointer data)
{
	stuff_to_free = g_slist_prepend (stuff_to_free, (gpointer)data);
}

GType perl_get_loader_type (GOErrorInfo **ret_error);

G_MODULE_EXPORT GType
perl_get_loader_type (GOErrorInfo **ret_error)
{
	GO_INIT_RET_ERROR_INFO (ret_error);
	return gnm_perl_plugin_loader_get_type ();
}

G_MODULE_EXPORT void
go_plugin_shutdown (GOPlugin *plugin, GOCmdContext *cc)
{
	g_slist_free_full (stuff_to_free, g_free);
	stuff_to_free = NULL;
}

G_MODULE_EXPORT void
go_plugin_init (GOPlugin *plugin, GOCmdContext *cc)
{
	GTypeModule *module = go_plugin_get_type_module (plugin);
	gnm_perl_plugin_loader_register_type (module);
}