view src/lib/module-dir.h @ 3879:928229f8b3e6 HEAD

deinit, unref, destroy, close, free, etc. functions now take a pointer to their data pointer, and set it to NULL. This makes double-frees less likely to cause security holes.
author Timo Sirainen <tss@iki.fi>
date Sat, 14 Jan 2006 20:47:20 +0200
parents 55df57c028d4
children ab1a0a377851
line wrap: on
line source

#ifndef __MODULE_DIR_H
#define __MODULE_DIR_H

struct module {
	char *path, *name;

	void *handle;
	void (*deinit)(void);

        struct module *next;
};

/* Load all modules in given directory. */
struct module *module_dir_load(const char *dir, bool require_init_funcs);
/* Unload all modules */
void module_dir_unload(struct module **modules);

void *module_get_symbol(struct module *module, const char *symbol);

#endif