Skip to content
Discussion options

You must be logged in to vote

Hello!

There's no public api, but you can add a function to your system class or meta or somewhere that removes the module from the vm->modules map. this means the next time import is used, it won't be already loaded, and the new code will be loaded instead. Older thread.

DEF_PRIMITIVE(system_unloadModule)
{
  if (!validateString(vm, args[1], "Module")) return false;
  Value result = wrenMapRemoveKey(vm, vm->modules, args[1]);
  RETURN_VAL(result);
}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Conaclos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants