Sophie

Sophie

distrib > Mandriva > 2009.1 > x86_64 > by-pkgid > 98bad4b4171170b863bb86fca4f8b939 > files > 12

lib64see-devel-3.0.1376-6mdv2009.1.x86_64.rpm

/* Copyright (c) 2006, David Leonard. All rights reserved. */
/* $Id$ */

#ifndef _SEE_h_module_
#define _SEE_h_module_

struct SEE_interpreter;

struct SEE_module {
	SEE_uint32_t	  magic;
	const char 	 *name;
	const char 	 *version;
	unsigned int	  index;	/* Set by SEE_module_add() */
	int		(*mod_init)(void);
	void		(*alloc)(struct SEE_interpreter *);
	void		(*init)(struct SEE_interpreter *);
};
#define SEE_MODULE_MAGIC (SEE_uint32_t)0x5345456d

int SEE_module_add(struct SEE_module *module);

/* Reference to the per-module private field of an interpreter */
#define SEE_MODULE_PRIVATE(interp, module)	\
	((interp)->module_private[(module)->index])

#endif