mirror of
https://github.com/irssi/irssi.git
synced 2026-08-17 07:32:04 +02:00
Implemented runtime loadable modules. /LOAD loads a module, /UNLOAD
unloads it. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@420 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
4475a04841
commit
21999ae205
6 changed files with 186 additions and 6 deletions
|
|
@ -1,6 +1,24 @@
|
|||
#ifndef __MODULES_H
|
||||
#define __MODULES_H
|
||||
|
||||
enum {
|
||||
MODULE_ERROR_ALREADY_LOADED,
|
||||
MODULE_ERROR_LOAD,
|
||||
MODULE_ERROR_INVALID
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
char *name;
|
||||
GModule *gmodule;
|
||||
} MODULE_REC;
|
||||
|
||||
extern GSList *modules;
|
||||
|
||||
MODULE_REC *module_find(const char *name);
|
||||
|
||||
int module_load(const char *path);
|
||||
void module_unload(MODULE_REC *module);
|
||||
|
||||
#define MODULE_DATA_INIT(rec) \
|
||||
(rec)->module_data = g_hash_table_new(g_str_hash, g_str_equal)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue