This commit is contained in:
BLUELOVETH 2023-07-19 18:21:30 +08:00
parent 9a5fae3659
commit 04c9cb8544

View File

@ -173,7 +173,9 @@ void init_builtins(VM* _vm) {
if(!entry){ if(!entry){
vm->_error("ImportError", "cannot load dynamic library: " + name.escape()); vm->_error("ImportError", "cannot load dynamic library: " + name.escape());
} }
vm->_c.s_view.push(ArgsView(vm->s_data.end(), vm->s_data.end()));
const char* name = entry(vm, PK_VERSION); const char* name = entry(vm, PK_VERSION);
vm->_c.s_view.pop();
if(name == nullptr){ if(name == nullptr){
vm->_error("ImportError", "module initialization failed: " + Str(name).escape()); vm->_error("ImportError", "module initialization failed: " + Str(name).escape());
} }