added dl_startup and dl_cleanup to vmprim

This commit is contained in:
hyunghwan.chung
2018-11-03 16:11:55 +00:00
parent d932d5f29b
commit 7699d332b8
4 changed files with 34 additions and 29 deletions

View File

@@ -149,6 +149,7 @@ int moo_init (moo_t* moo, moo_mmgr_t* mmgr, moo_oow_t heapsz, const moo_vmprim_t
moo->newheap = moo_makeheap (moo, heapsz);
if (!moo->newheap) goto oops;
if (moo->vmprim.dl_startup) moo->vmprim.dl_startup (moo);
return 0;
oops:
@@ -284,6 +285,8 @@ void moo_fini (moo_t* moo)
moo->inttostr.t.ptr = MOO_NULL;
moo->inttostr.t.capa = 0;
}
if (moo->vmprim.dl_cleanup) moo->vmprim.dl_cleanup (moo);
}
int moo_setoption (moo_t* moo, moo_option_t id, const void* value)