added the static_mods table for adding externally added static modules
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-12-16 17:58:01 +09:00
parent d3b90da1e7
commit ca1cf488e4
14 changed files with 465 additions and 264 deletions

View File

@@ -1101,6 +1101,13 @@ struct hawk_mod_sym_t
/* ------------------------------------------------------------------------ */
typedef struct hawk_mod_desc_t hawk_mod_desc_t;
struct hawk_mod_desc_t
{
const hawk_ooch_t* name;
hawk_mod_load_t load;
};
typedef struct hawk_mod_fnc_tab_t hawk_mod_fnc_tab_t;
struct hawk_mod_fnc_tab_t
{
@@ -2053,6 +2060,24 @@ HAWK_EXPORT void hawk_clrfnc (
hawk_t* hawk /**< hawk */
);
HAWK_EXPORT int hawk_addstaticmodwithbcstr (
hawk_t* hawk,
const hawk_bch_t* name,
hawk_mod_load_t load
);
HAWK_EXPORT int hawk_addstaticmodwithucstr (
hawk_t* hawk,
const hawk_uch_t* name,
hawk_mod_load_t load
);
#if defined(HAWK_OOCH_IS_BCH)
# define hawk_addstaticmod hawk_addstaticmodwithbcstr
#else
# define hawk_addstaticmod hawk_addstaticmodwithucstr
#endif
/**
* The hawk_parse() function parses a source script, and optionally
* deparses it back.