Files
ivy/mie/include/mie/module.h
Max Wash 8023ea622a mie: func name and args are now specified separately from func creation
func args are added manually using mie_func_add_arg, while the func's name
is specified when the func is added to a module, to allow the module to generate
a unique name.
2025-04-21 21:10:27 +01:00

38 lines
983 B
C

#ifndef MIE_MODULE_H_
#define MIE_MODULE_H_
#define MIE_MODULE(p) ((struct mie_module *)(p))
#include <blue/core/queue.h>
#include <mie/name.h>
#include <mie/value.h>
struct mie_func;
struct b_hashmap;
struct mie_module {
struct mie_value m_base;
struct mie_name_map *m_names;
b_queue m_records;
b_queue m_types;
b_queue m_func;
struct b_hashmap *m_data;
struct b_hashmap *m_data_strings;
};
extern struct mie_module *mie_module_create(void);
extern void mie_module_add_function(
struct mie_module *mod, struct mie_func *func, const char *name);
extern struct mie_data *mie_module_get_string_ptr(
struct mie_module *mod, const char *s);
extern struct mie_data *mie_module_get_data(
struct mie_module *mod, const char *name);
extern enum b_status mie_module_put_data(
struct mie_module *mod, struct mie_data *data, const char *name);
extern struct mie_value *mie_module_generate_value_name(
struct mie_module *mod, struct mie_value *val, const char *hint);
#endif