🚀 change module loading

This commit is contained in:
ValKmjolnir
2022-11-15 21:23:34 +08:00
parent 7e4faed4a6
commit 309a57070c
15 changed files with 154 additions and 693 deletions
+5 -1
View File
@@ -778,4 +778,8 @@ var nas_err(const string& err_f,const string& info)
}
typedef var (*mod)(var*,usize,gc*); // module function type
typedef mod (*getptr)(const char*); // module function "get" type
typedef struct {
const char* name;
mod fd;
} mod_func; // module function stores in tables with this type, end with {nullptr,nullptr}
typedef mod_func* (*getptr)(); // module function "get" type